Validators class
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 Methods
-
custom(
ValidationFunction func, {required String message}) → ValidationRule -
email(
{String message = 'Invalid email format'}) → ValidationRule -
maxLength(
int length, {String? message}) → ValidationRule -
minLength(
int length, {String? message}) → ValidationRule -
oneLowerCase(
{String message = 'Must contain at least one lowercase letter'}) → ValidationRule -
oneNumber(
{String message = 'Must contain at least one number'}) → ValidationRule -
oneSpecial(
{String message = 'Must contain at least one special character'}) → ValidationRule -
oneUpperCase(
{String message = 'Must contain at least one uppercase letter'}) → ValidationRule -
pattern(
String pattern, {required String message}) → ValidationRule -
required(
{String message = 'This field is required'}) → ValidationRule -
validate(
String? value, List< ValidationRule> rules) → String?