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

# validateUserInterfaceItem(_:)

Validates the specified user interface item that the receiver manages.

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

## Parameters

`item`

The user interface item to validate.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the item is valid; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

These items currently include only Revert and Save. You can override this method to add more selectors validated by your document subclass.

---

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)