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, or custom getters and setters.protected
- Can be publicly read but only written to in the constructor and getters & setters.public
- public – Allows manipulation from any point or user. Public constraints have native getters and setters.global
- Can be read from anywhere but only manipulated from within package
VAR_NAME
- Name of constraint. Only lowercase letters, numbers, or underscores.VAR_TYPE
- Standard variable types:string
,bool
,int
,double
,char
,array
,Standard
VAR_LENGTH
- Number of characters accepted as integer.- The optional char
!
means the constraint value provided is equal to theVAR_LENGTH
provided. The record will be rejected if length doesn't match.
- The optional char
VAR_REF
- Constraint reference allows you to shorthand Standards and constraints. If Standard ‘school’ isSCH
and has a constraint ‘street’ asSADDR
, in many cases we can access this as SCH.ADDR."DEFAULT_VALUE"
- 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