<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSValidatedUserInterfaceItem",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSValidatedUserInterfaceItem"
  },
  "title" : "NSValidatedUserInterfaceItem"
}
-->

# NSValidatedUserInterfaceItem

A protocol that a custom class can adopt to manage the automatic enablement of a UI control.

```
protocol NSValidatedUserInterfaceItem
```

## Overview

The [`NSValidatedUserInterfaceItem`](/documentation/AppKit/NSValidatedUserInterfaceItem) protocol works with the [`NSUserInterfaceValidations`](/documentation/AppKit/NSUserInterfaceValidations) protocol to enable or disable a control automatically, depending on whether any responder in the responder chain can handle the control’s action method. The [`NSMenuItem`](/documentation/AppKit/NSMenuItem) and [`NSToolbarItem`](/documentation/AppKit/NSToolbarItem) classes implement this protocol.

By conforming to this protocol, your control can participate in this validation mechanism. To validate a control, the application calls [`validateUserInterfaceItem(_:)`](/documentation/AppKit/NSUserInterfaceValidations/validateUserInterfaceItem(_:)) for each item in the responder chain, starting with the first responder. If no responder returns <doc://com.apple.documentation/documentation/Swift/true>, the item is disabled. For example, a menu item that sends the `copy:` action message would disable itself if no responder in the responder chain can be copied.

## Topics

### Getting information about a user interface item

[`action`](/documentation/AppKit/NSValidatedUserInterfaceItem/action)

Returns the selector of the receiver’s action method.

[`tag`](/documentation/AppKit/NSValidatedUserInterfaceItem/tag)

Returns the receiver’s tag integer.

## Relationships

### Conforming Types

[`NSMenuToolbarItem`](/documentation/AppKit/NSMenuToolbarItem)

[`NSTrackingSeparatorToolbarItem`](/documentation/AppKit/NSTrackingSeparatorToolbarItem)

[`NSToolbarItem`](/documentation/AppKit/NSToolbarItem)

[`NSSearchToolbarItem`](/documentation/AppKit/NSSearchToolbarItem)

[`NSToolbarItemGroup`](/documentation/AppKit/NSToolbarItemGroup)

[`NSSharingServicePickerToolbarItem`](/documentation/AppKit/NSSharingServicePickerToolbarItem)

[`NSMenuItem`](/documentation/AppKit/NSMenuItem)

---

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)