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

# NSUserInterfaceValidations

A protocol that a custom class can adopt to manage the enabled state of a UI element.

```
protocol NSUserInterfaceValidations
```

## Overview

The [`NSUserInterfaceValidations`](/documentation/AppKit/NSUserInterfaceValidations) protocol works with the [`NSValidatedUserInterfaceItem`](/documentation/AppKit/NSValidatedUserInterfaceItem) protocol to allow the target of a user interface element such as a menu item or a toolbar item to decide whether or not the user interface element should be enabled.

Your custom classes should adopt this protocol if an instance may be the target of a user interface element and need to conditionally enable or disable the element based on the current state of the instance. For more details, read [User Interface Validation](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UIValidation/UIValidation.html#//apple_ref/doc/uid/10000040i).

## Topics

### Validating user interface items

[`validateUserInterfaceItem(_:)`](/documentation/AppKit/NSUserInterfaceValidations/validateUserInterfaceItem(_:))

Returns a Boolean value that indicates whether the sender should be enabled.



---

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)