Home > Guides > Core Developers Guide > Annotations > RegexFieldValidator Annotation

Validates a string field using a regular expression.


The annotation must be applied at method level.


Parameter Required Default Notes
messageyes field error message
keyno i18n key from language specific properties file.
messageParamsno Additional params to be used to customize message - will be evaluated against the Value Stack
shortCircuitnofalseIf this validator should be used as shortCircuit.
typeyesValidatorType.FIELDEnum value from ValidatorType. Either FIELD or SIMPLE can be used here.
regexyes The regex to validate the field value against.