LyStringMatches class
Validation that requires a string to match a regular expression.
If the value does not match the regular expression, the message is returned.
Example:
final validator = StringMatches('Invalid email', r'^[a-zA-Z0-9]*$');
final result = validation('laura@mgail');
print(result); // Invalid email
Constructors
- LyStringMatches(String message, dynamic pattern)
- Validation that requires a string to match a regular expression.
Properties
Methods
-
call(
String value) → String? -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator &(
LyBaseValidator< String> other) → LyBaseValidator<String> -
inherited
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator |(
LyBaseValidator< String> other) → LyBaseValidator<String> -
inherited