CorextraValidationResult class

The outcome of a validation: which fields failed and why.

Example:

final result = form.validation;
result.isValid;            // false
result.errors;             // {email: Please enter a valid email address}
result.firstError;         // Please enter a valid email address
result.errorFor('email');  // Please enter a valid email address

Constructors

CorextraValidationResult(Map<String, String?> checks)
Keeps only the fields in checks that have an error message.

Properties

errors → Map<String, String>
The fields that failed, with their messages.
final
firstError → String?
The first error message, or null when everything is valid.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isValid → bool
Whether every field passes.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

errorFor(String field) → String?
The error message for field, or null when it's valid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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