EasyValidator class

A chainable validator builder for form fields.

Constructors

EasyValidator()

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

add(String? validator(String?)) EasyValidator
Pass a custom validator function.
build() String? Function(String?)
Builds the final validator function.
email([String? message]) EasyValidator
Validates that the field contains a valid email.
match(String otherValue, [String? message]) EasyValidator
Validates matches another field (e.g. confirm password).
minLength(int length, [String? message]) EasyValidator
Validates minimum length.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pattern(String pattern, [String? message]) EasyValidator
Validates matches a regex.
required([String? message]) EasyValidator
Validates that the field is not empty.
toString() String
A string representation of this object.
inherited

Operators

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