<!--
{
  "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.

## Relationships

### Conforming Types

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---

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)