RegexRule class
Validates that a field's value matches a given regular expression.
- Implemented types
- Annotations
Constructors
- RegexRule.new(RegExp regex, {required String message})
-
Creates a regex validation rule.
regex
is the pattern the value must match.message
is the error message if the value does not match.const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
String? value, {BuildContext? context}) → String? -
Validates the given
value
. Returns an error message String if validation fails, otherwise returns `null].override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited