BlocxRegexValidator class
Validator that ensures a field matches a given regular expression pattern.
- Inheritance
-
- Object
- BlocxFieldValidator<
String> - BlocxSingleErrorFieldValidator<
String> - BlocxRegexValidator
Constructors
- BlocxRegexValidator({required RegExp pattern, required String errorMessage, Duration? duration})
-
Creates a validator with the provided
patternanderrorMessage.
Properties
- duration → Duration?
-
Optional duration associated with the error messages.
finalinherited
- errorMessage → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- pattern → RegExp
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateWithSingleError(
String value) → String? -
Validates the given
valueand returns a single error message if invalid.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited