Constraints
[ACCESS_TYPE] CONST_NAME [CONST_TYPE [:LENGTH[!]]] [NULL] [CONST_REF] ["DEFAULT_VALUE" | "/REGEX/"] [*]
-
ACCESS_TYPE— Constraint access type (scope)-
private— Only accessible in constructor when setting. -
protected— Can be publicly read but only written to in the constructor. -
public— Allows manipulation from any point or user within the package. -
global— Can be read from anywhere but only manipulated from within the package.
-
-
CONST_NAME— Name of constraint. Only lowercase letters, numbers, or underscores. -
CONST_TYPE— Standard variable types:string,bool,int,double,char,array,Standard. -
LENGTH— Number of characters accepted as integer.-
The optional character
!means the constraint value provided must be equal to theLENGTHprovided. The record will be rejected if the length doesn't match. If!is not provided,LENGTHis max length.
-
The optional character
-
CONST_REF— Constraint reference allows you to shorthand Standards and constraints. If StandardschoolisSCHand has a constraintstreetasSADDR, in many cases it can be accessed asSCH.ADDR. -
"DEFAULT_VALUE || REGEX"— Default value. If a value is not provided for this constraint, the value listed will be used. If you provide no value, the value saved will beNULL. If a regex is provided, the value must match the regex. -
*— If a constraint ends with*, a value must be provided for the constraint or the record will be rejected.