Include the Validator class on the InvalidValue object

Description

It'd be nice to know which validator caused an InvalidValue entry to appear.
For example, for a @NotNull annotation we'd have:

InvalidValue.getValidatorClass() == org.hibernate.validator.NotNullValidator

Then, on the web layer of the application, we could iterate over every InvalidValue[], summarizing all the NotNullValidator entries we get, and showing a msg:

  • Some required fields are missing.

(and put some asterisks on the required fields, for example).

(I guess that can be done with an additional BeanValidator, but this solution lets us work with the InvalidValue[] array after all validation has taken place)

Environment

None

Status

Assignee

Unassigned

Reporter

Leonardo Quijano

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Minor
Configure