ContainsNumbersValidator class final
- Inheritance
-
- Object
- EasyValidator
- ContainsNumbersValidator
- Mixed-in types
Constructors
- ContainsNumbersValidator({RegExp? regExp, String? errorMessage})
-
A validator that checks if a value contains numbers.
This validator is used to validate strings and other types that have a length property.
It returns an error message if the value does not contain numbers.
Example usage:
const
Properties
- errorMessage → String?
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- regExp → RegExp?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getErrorMessage(
String message, [String? replacement]) → String -
Returns the error message with optional replacement.
inherited
-
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) → String? -
Validates the given
valueand returns an error message if the value is invalid.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override