PregMatchΒΆ
Checks a field value using the configured perl regular expression.
You can use this check to do existing check your own way or to make checks no built-in error check exists for.
Example Code:
validators {
DefaultValidator {
model = DefaultValidator
config {
fields {
post-code.errorChecks {
pregMatch {
model = PregMatch
pattern = /^DE-.*$/
}
}
}
}
}
}
Properties
pattern |
The regex pattern to search for, as a string. |
Mandatory |
False |
Data Type |
String |
Default |
Empty String |