FieldValidateResult constructor
Constructor for FieldValidateResult
.
If error
is provided and not empty, it is added to the errors
list automatically.
Implementation
FieldValidateResult({
this.success = false,
this.errors = const [],
this.error = '',
}) {
if (error.isNotEmpty) {
errors = [...errors, error];
}
}