---
title: "validateAction(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextfinder/validateaction(_:)"
---

# validateAction(_:)

Allows validation of the find action before performing.

## Declaration

```swift
func validateAction(_ op: NSTextFinder.Action) -> Bool
```

## Parameters

- `op`: The sender’s tag.

## Return Value

Return Value true if the operation is valid; otherwise false.

## Discussion

Discussion Responders the NSResponder method  performTextFinderAction(_:) should call this method. This method should be called by an implementation of validateUserInterfaceItem(_:) to properly validate items with an action of performTextFinderAction(_:). The responder’s validateUserInterfaceItem(_:) or validateMenuItem: implementation should pass the tag as the action for this method..

## See Also

### Validating and Performing Text Finding

- [performAction(_:)](appkit/nstextfinder/performaction(_:).md)
- [cancelFindIndicator()](appkit/nstextfinder/cancelfindindicator().md)
