---
title: NSUserInterfaceValidations
framework: appkit
role: symbol
role_heading: Protocol
path: appkit/nsuserinterfacevalidations
---

# NSUserInterfaceValidations

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

## Declaration

```swift
protocol NSUserInterfaceValidations
```

## Overview

Overview The NSUserInterfaceValidations protocol works with the 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.

## Topics

### Validating user interface items

- [validateUserInterfaceItem(_:)](appkit/nsuserinterfacevalidations/validateuserinterfaceitem(_:).md)

## Relationships

### Conforming Types

- [NSApplication](appkit/nsapplication.md)
- [NSButton](appkit/nsbutton.md)
- [NSColorPanel](appkit/nscolorpanel.md)
- [NSComboBox](appkit/nscombobox.md)
- [NSDocument](appkit/nsdocument.md)
- [NSDocumentController](appkit/nsdocumentcontroller.md)
- [NSFontPanel](appkit/nsfontpanel.md)
- [NSForm](appkit/nsform.md)
- [NSMatrix](appkit/nsmatrix.md)
- [NSOpenPanel](appkit/nsopenpanel.md)
- [NSOutlineView](appkit/nsoutlineview.md)
- [NSPanel](appkit/nspanel.md)
- [NSPersistentDocument](appkit/nspersistentdocument.md)
- [NSPopUpButton](appkit/nspopupbutton.md)
- [NSSavePanel](appkit/nssavepanel.md)
- [NSSearchField](appkit/nssearchfield.md)
- [NSSecureTextField](appkit/nssecuretextfield.md)
- [NSSplitViewController](appkit/nssplitviewcontroller.md)
- [NSStatusBarButton](appkit/nsstatusbarbutton.md)
- [NSTableView](appkit/nstableview.md)
- [NSTextField](appkit/nstextfield.md)
- [NSTextView](appkit/nstextview.md)
- [NSTokenField](appkit/nstokenfield.md)
- [NSWindow](appkit/nswindow.md)

## See Also

### UI validation

- [NSValidatedUserInterfaceItem](appkit/nsvalidateduserinterfaceitem.md)
