FormValidators class
Form validators with optional translation.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- canTranslate ↔ bool
-
Whether translation is enabled. Defaults to false.
getter/setter pair
- translator ↔ Translator?
-
Translator function. If not set, messages are returned as-is.
getter/setter pair
Static Methods
-
confirmPassword(
String? value, String newPassword, {int minLength = 6}) → String? - Confirm password validator Example:
-
email(
String? value) → String? - Email validator Example:
-
enableTranslation(
[bool enable = true]) → void - Enable or disable translation. Example:
-
otp(
String? value, {int length = 4}) → String? - OTP validator Example:
-
password(
String? value, {int minLength = 6}) → String? - Password validator Example:
-
phone(
String mask, String? value) → String? - General phone validator Example:
-
required(
String? value) → String? - General required field validator Example:
-
setTranslator(
Translator fn) → void - Set the translator function. Example: