EmailValidator class

Ensures the value is a validly formatted email address.

Inheritance

Constructors

EmailValidator({required String error, bool ignoreEmptyValues = true})
const

Properties

error String
The error message returned when validation fails.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
ignoreEmptyValues bool
Whether empty input (see isEmpty) short-circuits to "valid".
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(String? value) String?
Validates value: returns null when it is acceptable, error when it is not.
inherited
isEmpty(String value) bool
Treats whitespace-only input as blank so an optional field never reports a format error when "left blank". Trimming only gates the skip; the raw value is still what isValid receives.
inherited
isValid(String value) bool
Checks whether a non-empty value satisfies the validation criteria.
override
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 ==(Object other) bool
The equality operator.
inherited