Hello, Is it possible to customize the error messages for inbuilt constraints such as @Range?
For example instead of seeing the error message: foo[0].bar[2].value must be between 0 and 999
can I instead somehow see the error message: fooName.barName.value must be between 0 and 999
where fooName and barName are string representations of some sort for the objects foo[0] and bar[2]?
Obviously I don't want to reimplement @Range as a custom validation constraint and then supply the message template. I want to use the inbuilt implementation of @Range, but just customize the property path to be more (my) user friendly.
Thanks!
_________________ Naresh
Please rate replies if they've helped you out.
|