Basic script structure
The basic script structure only contains the pure validation logic in a rule
. More information: Validation logic.
rule { }
Example
The following script checks that the asset name is not empty and contains more than two characters.
rule { isNotEmpty(attributes.'Definition', message: "Definition cannot be empty") && isLengthMore(attributes.'Definition'?.first(), 20, message: "Description should have more than 20 characters") }