rejection property
Rejection?
get
rejection
The 422 for these errors, or null when the value is valid.
Every message survives: two failures on one field become two entries under that field rather than the first one winning. The response body is
{"error": "Validation failed", "fields": {"title": ["must not be empty"]}}
Implementation
Rejection? get rejection {
if (errors.isEmpty) return null;
return Rejection.unprocessable(
groupValidationErrors(errors),
message: 'Validation failed',
);
}