Skip to content

Commit

Permalink
Use message field.{propery} for error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sprevilla committed Sep 27, 2019
1 parent a53a5c6 commit 70a2671
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ public List<Validator> getValidators(String propertyId) {
return null;
}
if (regex != null)
validators.add(new RegexpValidator(getApp().getMessage("errorMessage.invalidField", getApp().getMessage(propertyId)),regex));
validators.add(new RegexpValidator(getApp().getMessage("errorMessage.invalidField", getApp().getMessage("field." + propertyId)),regex));
if (length > 0)
validators.add(new StringLengthValidator(getApp().getMessage("errorMessage.invalidField", getApp().getMessage(propertyId)),0,length));
validators.add(new StringLengthValidator(getApp().getMessage("errorMessage.invalidField", getApp().getMessage("field." + propertyId)),0,length));
if ("email".equals(propertyId)) {
validators.add(new EmailValidator(getApp().getMessage("errorMessage.invalidEmail")) {
@Override
Expand Down

0 comments on commit 70a2671

Please # to comment.