IsAlphabetValidator class
Metadata to validate if String instance is alphabet or not
trimWhiteSpace if true
the whitespace and tab will be replaced
by empty string
allowMultiline if true
it will allow multiline
onlyAcceptLowerCase when this value is true
only accept 'a-z' character.
Otherwise it will accept uppercase too
if value Type is not String it will throw an Exception
For now only support 'a-z' & 'A-Z' alphabet
- Inheritance
-
- Object
- ValidatorAnnotation
- IsAlphabetValidator
Constructors
Properties
- allowMultiline → bool
-
final
- defaultErrorMessage → String
-
default error message when errorMessage value is null
no setteroverride
- errorMessage → String
-
get error message
no setterinherited
- fieldName → String?
-
field name
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
decorator name
finalinherited
- onlyAcceptLowerCase → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trimWhiteSpace → bool
-
when this value is true
final
Methods
-
isValid(
dynamic value) → bool -
validate where
value
is string and contain only alphabetoverride -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
dynamic value) → String? -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited