---
title: "validateUserInterfaceItem(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdocumentcontroller/validateuserinterfaceitem(_:)"
---

# validateUserInterfaceItem(_:)

Returns a Boolean value that indicates whether a given user interface item should be enabled.

## Declaration

```swift
@MainActor func validateUserInterfaceItem(_ item: any NSValidatedUserInterfaceItem) -> Bool
```

## Parameters

- `item`: The user interface item to validate. You can send anItem the doc://com.apple.appkit/documentation/AppKit/NSValidatedUserInterfaceItem/action and doc://com.apple.appkit/documentation/AppKit/NSValidatedUserInterfaceItem/tag messages.

## Return Value

Return Value true if item should be enabled, otherwise false.

## Discussion

Discussion Subclasses can override this method to perform additional validations. Subclasses should call the underlying method on super in their implementation for items they don’t handle themselves.
