Closed
Description
How do we feel about custom error message like some other libraries have:
[
'type' => 'string',
'pattern' => '^[sr]-\d+$',
'message' => [
'pattern' => 'Invalid sport/resource format, expected "s" or "r" + ID',
],
],
Would use message.pattern
if the pattern
constraint failed.
I started with a PR for 5.2.11, but that's not how master works anymore, because every error is a ConstraintError
now, which makes custom impossible by enum definition. Don't how how to approach it now. addError()
knows the failed constraint, but not the element's schema/message
item.
Metadata
Metadata
Assignees
Labels
No labels