Validators class

Collection of reusable form field validators (email, password, phone, etc.).

Constructors

Validators({ValidatorMessages messages = const ValidatorMessages()})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
messages → ValidatorMessages
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

email({String? requiredMsg, String? invalidMsg}) → String? Function(String?)
minLength(int min, {String? requiredMsg, String? shortMsg}) → String? Function(String?)
mustMatch(String other(), {String? requiredMsg, String? mismatchMsg}) → String? Function(String?)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numeric({String? requiredMsg, String? invalidMsg}) → String? Function(String?)
password({int minLength = 6, String? requiredMsg, String? shortMsg}) → String? Function(String?)
phone({String? requiredMsg, String? invalidMsg}) → String? Function(String?)
required({String? msg}) → String? Function(String?)
requiredWhen(bool condition(), {String? msg}) → String? Function(String?)
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited