easy_forms_validation library

Classes

BoolFieldController<ValidationError>
FieldBuilder<Value, ValidationError>
FieldController<Value, ValidationError>
FieldController is a controller for a field in a form.
FieldControllerState<Value, ValidationError>
The state of the field. It contains the current value, error and validation state.
FieldRef
It is used to watch the state of another field. It is useful to create fields validators that depend on other fields.
FormControllerState
FormPart<T extends FormPartState>
FormPart represents a part of the form that can be validated. It can be a field, a group of fields, or a whole form.
FormPartBuilder<T extends FormPartState>
A ValueListenableBuilder listens to a FormPart's FormPartState. Provided node may be a field FieldController or a form FormControllerMixin.
FormPartState
MultiselectFieldController<Value, ValidationError>
RequiredNullableFieldController<Value, ValidationError>
Use RequiredNullableFieldController if the field's value can be null during filling the form, but it should be non-null when the form is submitted.
SelectFieldController<Value, ValidationError>
TextFieldBuilder<ValidationError>
TextFieldController<ValidationError>

Mixins

FormControllerMixin
FormControllerMixin is a mixin for any class that needs form validation logic.
FormValueMixin<Form extends FormControllerMixin, T>
SubmitFormMixin<Form extends FormControllerMixin, Result>
Mixin that adds submit logic.

Typedefs

FieldValidator<Value, ValidationError> = ValidationError? Function(Value value, FieldRef ref)