ValidationError class

Representa um erro de validação pontual, com o campo e a mensagem.

Usado como tipo de Failure nos métodos validate*() de AllValidations.

Exemplo:

AllValidations.validateCPF(cpf).fold(
  (err) => print('${err.property}: ${err.message}'),
  (cpf) => print('CPF ok'),
);

Constructors

ValidationError({required String property, required String message})
const

Properties

hashCode int
The hash code for this object.
no setteroverride
message String
final
property String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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.
override