ValidationResult class

A holder class to hold validation result

errors is list of error in MapEntry type

key of MapEntry is fieldName

value of MapEntry is errorMessage

Implemented types
Available extensions

Constructors

ValidationResult.new({required List<ValidationError> errors, required List<ValidationData> validationData})
const

Properties

errors List<ValidationError>
list of error in MapEntry
final
firstError ValidationError
get first error in String
no setter
firstErrorToString String
get first error
no setter
formattedMessage String

Available on Exception, provided by the ExceptionExtension extension

no setter
hashCode int
The hash code for this object.
no setterinherited
isError bool
will true when errors is not empty
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validationData List<ValidationData>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<T>({required T error(ValidationResult result), required T noError(ValidationResult result)}) → T
guard function

Operators

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