There are several different validators we can use to ensure that our data is accurate and ensure integrity. Below is a list of all available validators. If you add a new validator, please add it in the list.
General Validators
These are regular validators that don’t fit in other categories.
RequiredValidator
Marks that a value is required. Doesn’t accept null, “”, 0 and similarly empty values.
EqualsValidator
Validates that a value exactly matches another, hardcoded value.
Format Validators
These validators ensure that text is in a valid format.
EmailValidator
Validates that a value is a valid email
TextValidator
Validates that a value is ASCII text with no special characters
PhoneValidator
Validates that a value is a valid phone number
Note: This validator isn’t available yet
MinLengthValidator
Validates that a value has a length greater than or equals to the specified digit
MaxLengthValidator
Validates that a value has a length less than or equals to the specified digit
RegexValidator
Validates that a value matches a specified regex format
AnyRegexValidator
Validates that a value matches one of the specified regexes
Number Validators
These validators are used to verify numeric values.
NumberValidator
Validates that a value is a valid number or can be converted accurately
Database Validators
These validators are used to verify values according to data in database.
UniqueValidator
Validates that a value is unique in the entire database.
Note: It allows duplicate empty values. Please pair with required to ensure that values are unique and required.