NotStartWithValidator class final
- Inheritance
-
- Object
- EasyValidator
- NotStartWithValidator
- Mixed-in types
Constructors
- NotStartWithValidator(String notStartWith, {bool caseSensitive = true, bool useTrim = false, String? errorMessage})
-
A validator that checks if a value does not start with a specified string.
This validator is used to validate strings and other types that have a length property.
It returns an error message if the value starts with the specified string.
The
notStartWithparameter specifies the undesired string that the value should not start with. Example usage:const
Properties
- caseSensitive → bool
-
The caseSensitive parameter determines whether the comparison should be case-sensitive or not.
final
- errorMessage → String?
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- notStartWith → String
-
The notStartWith parameter specifies the undesired string that the value should not start with.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useTrim → bool
-
The useTrim parameter determines whether the comparison should ignore string leading and trailing whitespace or not.
final
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