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.
Source
const Validate.matches(String pattern, {bool onUpdate: true, onInsert: true}) : this._( value: pattern, onUpdate: onUpdate, onInsert: onInsert, validator: _BuiltinValidate.regex);