---
title: NSValidatedUserInterfaceItem
framework: appkit
role: symbol
role_heading: Protocol
path: appkit/nsvalidateduserinterfaceitem
---

# NSValidatedUserInterfaceItem

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

## Declaration

```swift
protocol NSValidatedUserInterfaceItem
```

## Overview

Overview The NSValidatedUserInterfaceItem protocol works with the 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 and 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(_:) for each item in the responder chain, starting with the first responder. If no responder returns 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](appkit/nsvalidateduserinterfaceitem/action.md)
- [tag](appkit/nsvalidateduserinterfaceitem/tag.md)

## Relationships

### Conforming Types

- [NSMenuItem](appkit/nsmenuitem.md)
- [NSMenuToolbarItem](appkit/nsmenutoolbaritem.md)
- [NSSearchToolbarItem](appkit/nssearchtoolbaritem.md)
- [NSSharingServicePickerToolbarItem](appkit/nssharingservicepickertoolbaritem.md)
- [NSToolbarItem](appkit/nstoolbaritem.md)
- [NSToolbarItemGroup](appkit/nstoolbaritemgroup.md)
- [NSTrackingSeparatorToolbarItem](appkit/nstrackingseparatortoolbaritem.md)

## See Also

### UI validation

- [NSUserInterfaceValidations](appkit/nsuserinterfacevalidations.md)
