Configuring Record-Level Custom Validation
You can configure custom data validation at the record level. First, you create an Operation record and define metadata, and then create a relationship between the operation and the object type for which you want to configure validation. You then create and add Groovy code to implement custom validation logic.
* 
The following procedure assumes that you have previously created an Operation record to validate records of an object.
To configure record-level custom data validation:
1. In Max Designer, on the Developer Tools () launchpad menu, click Operations, and then in the list view, click the validator operation for the object you want to configure, for example, Job Validator.
2. On the object page, on the Overview tab, specify the following values, and then click Save and Close ().
Option
Value
Computer Language
Groovy
Class Name
The name of the class used to implement custom validation logic.
Method Name
validateRecord
3. On the Developer Tools () launchpad menu, click Objects, and then in the list view, click the target object for the custom validation operation, for example, Job.
4. On the record page, in the Relations tab, in the Related Lists list, click the Operations entry with a Relationship value of Object Validator, and then in the Object Validator list, in the top left corner, click Link ().
5. On the Link Related Operations list, click the validator you configured for custom validation, for example, Job Validator, and then in the top left corner, click Link Related Records ().
6. On the Developer Tools () launchpad menu, click Operations, and then in the list view, click the validator you created for custom validation, for example, Job Validator.
7. On the record page, in the Sources tab, click Create (), and then in the Create New Source dialog box, in the Name and Application fields, enter and save values.
8. Create Groovy source code to implement the desired custom validation logic, and then in the Sources tab, click the newly created Source record and update the code.
* 
For Groovy source code class definitions and examples, see Custom Data Validation Source Code in Max for Developers.
For more information:
Was this helpful?