Introduction to User Interface Validation

The protocols NSUserInterfaceValidations and NSValidatedUserInterfaceItem provide a standard way to validate user interface items—that is, to set their state as appropriate for the current application context (for example, to disable the Paste menu item if there is no suitable data on the pasteboard).

You should read this document to learn how to implement user interface item validation and how to extend the user interface validation protocol.

For more information about other ways to validate menus and pop-up lists, see Application Menu and Pop-up List Programming Topics.

Organization of This Document

Implementing Validation describes how to use the NSUserInterfaceValidations and NSValidatedUserInterfaceItem protocols to validate user interface items.

Implementing a Validated Item describes you can implement an item that uses the validation protocol to determine its state, and how to extend the NSUserInterfaceValidations protocol to provide custom user interface item validation.