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 — 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 the 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 character ! means the constraint value provided must be equal to the VAR_LENGTH provided. The record will be rejected if the length doesn't match.
  • VAR_REF — Constraint reference allows you to shorthand Standards and constraints. If Standard school is SCH and has a constraint street as SADDR, 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 be NULL.