Validators class abstract final

Input validators for common field types.

Each validator returns null on success or an error string on failure, compatible with Flutter's FormField.validator signature.

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 Methods

confirmPassword(String? value, String original) String?
email(String? value) String?
maxLength(String? value, int max, [String? fieldName]) String?
minLength(String? value, int min, [String? fieldName]) String?
password(String? value) String?
Minimum 8 characters, at least one letter and one number.
phone(String? value) String?
Validates E.164 phone number format (e.g. +2348012345678).
required(String? value, [String fieldName = 'This field']) String?