ValidationResult class

Returned when validate is called, this holds potential errors with validated objects.

Constructors

ValidationResult({List<ValidationError> errors = const <ValidationError>[], bool hasError = false})
ValidationResult.fromError(String message)
Creates a new validation result to represent an error.
factory
ValidationResult.fromJson(String source)
factory
ValidationResult.fromMap(Map<String, dynamic> map)
factory
ValidationResult.merge(List<ValidationResult> results, bool ignorePassedMessages)
Merges a collection of validation results together. Using ignorePassedMessages will only keep the messages on failed tests.
factory

Properties

errors → List<ValidationError>
Messages which represent the error which can occur
final
hasError → bool
Whether the result of this action was an error
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getErrorList(String key) → List<ValidationError>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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