Description
Currently there is no other way to change the default message key of any validator. Provide a protected non final method: getMessageKey() to allow overriding of the message key. For example for MinimumValidator:
[CODE]
public void validate(IValidatable<Z> validatable)
{
Z value = validatable.getValue();
if (value.compareTo(minimum) < 0)
}
protected String getMessageKey()
{ return "MinimumValidator"; }[CODE]
Attachments
1.
|
Make (Minimum|Maximum|Range) validators extending AbstractValidator | Resolved | Unassigned |