Validate.matches constructor
A validator for matching an input String against a regular expression.
Values passing through validators of this type must match a regular expression
created by pattern
. See RegExp in the Dart standard library for behavior.
This validator is only valid for String properties.
If onUpdate
is true (the default), this validation is run on update queries.
If onInsert
is true (the default), this validation is run on insert queries.
Implementation
const Validate.matches(
String pattern, {
bool onUpdate = true,
bool onInsert = true,
}) : this._(
value: pattern,
onUpdate: onUpdate,
onInsert: onInsert,
validator: ValidateType.regex,
);