FormUtils class mixin

Class used as a dart Mixin to a Form class, providing methods to conviniently deal with validation and serialization of fields.

Constructors

FormUtils()

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

fieldsToJson(List<FormField> fields) Map<String, dynamic>
Method to help in the task of passing the provided List<FormField> to its Map<String, dynamic> representation, that is useful when it comes to pass the Form data through, for instance, a request body
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validateField<Type>({required Maybe<Type> field, required List<Validator<Type>> validators}) Result<String>
Method to help validate a FormField<Type> providing its value represented by its Maybe<Type>, and a List<Validator<Type>>, returning a Result<String> with possible error message.

Operators

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