discontinuedPackage mobx_form_builder has been discontinued and replaced by flutter_formx.

Validator<T> class abstract

Validator is an abstract class that will allow you to create whatever validation you need, always returning the same ValidatorResult object. T stands for the type used to identify the fields such as a custom object or a string.

Implementers

Constructors

Validator()

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
result({required bool isValid, required String? errorMessage}) → Future<ValidatorResult>
Returns a validation result as a Future to avoid verbosity
toString() → String
A string representation of this object.
inherited
validate(T value) → Future<ValidatorResult>
Called by the FormBuilder to on each field.

Operators

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