<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDocumentController/validateUserInterfaceItem(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDocumentController(im)validateUserInterfaceItem:"
  },
  "title" : "validateUserInterfaceItem(_:)"
}
-->

# validateUserInterfaceItem(_:)

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

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

## Parameters

`item`

The user interface item to validate. You can send `anItem` the [`action`](/documentation/AppKit/NSValidatedUserInterfaceItem/action) and [`tag`](/documentation/AppKit/NSValidatedUserInterfaceItem/tag) messages.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if `item` should be enabled, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)