Skip to main content

%OnValidateObject()

%OnValidateObject()

This instance method is called by the %ValidateObject() method just after all validation has occurred. This allows you to perform custom validation, such as where valid values for one property vary according to the value of another property.

Its signature is:

Method %OnValidateObject() As %Status [ Private, ServerOnly = 1 ] 
{
    // body of method here...
}

The method returns a %StatusOpens in a new tab code, where a failure status causes the validation to fail.

Subclasses of %Library.RegisteredObjectOpens in a new tab have the option of overriding this method.

FeedbackOpens in a new tab