I am using the Apache Bean JSR-303 Validation Implementation, and I was curious if there is a way to add a message to the default message that is defined in the ValidationMessages.propeties file.
those. @NotNull(message="Object objectField name {message}")
Conclusion: the object of the object. The field name cannot be null.
If the message simply adds a default message
Is this possible using the Apache Bean Validation 0.3 or Hibernate Validation 4.1.0-Final APIs
Or am I forced to do something like this:
ValidationMessage.properites javax.validation.constraints.NotNull.message=may not be null
Code:
@NotNull(message="Object objectField name {javax.validation.constraints.NotNull.message}")
It just seems very verbose.
source share