---
title: "validate(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiresponder/validate(_:)"
---

# validate(_:)

Asks the receiving responder to validate the command.

## Declaration

```swift
func validate(_ command: UICommand)
```

## Parameters

- `command`: A mutable command object.

## Discussion

Discussion Override this method in your view controller to make changes to a command before the command system renders it as a menu item.

## See Also

### Building and validating commands

- [buildMenu(with:)](uikit/uiresponder/buildmenu(with:).md)
- [canPerformAction(_:withSender:)](uikit/uiresponder/canperformaction(_:withsender:).md)
- [target(forAction:withSender:)](uikit/uiresponder/target(foraction:withsender:).md)
