Skip to content

Commit

Permalink
#657 add min length message (en)
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Jul 31, 2019
1 parent b317d4d commit 988d6c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/alfio/util/Validator.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public static ValidationResult validateTicketAssignment(UpdateTicketOwnerForm fo
}

if(StringUtils.isNotBlank(formValue) && fieldConf.isMinLengthDefined() && StringUtils.length(formValue) < fieldConf.getMinLength()) {
errors.rejectValue(prefixForLambda + "additional["+fieldConf.getName()+"]["+i+"]", "error."+fieldConf.getName(), new Object[] { fieldConf.getMinLength() }, null);
errors.rejectValue(prefixForLambda + "additional["+fieldConf.getName()+"]["+i+"]", "error.tooShort", new Object[] { fieldConf.getMinLength() }, null);
}

if(!fieldConf.getRestrictedValues().isEmpty()) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/alfio/i18n/public.properties
Original file line number Diff line number Diff line change
Expand Up @@ -411,4 +411,6 @@ error.alphanumeric=The value must be alphanumeric
reservation.payment-in-progress=Please wait
invoice.type=Invoice Type
invoice.type.private=Private Customer
invoice.type.business=Business Customer
invoice.type.business=Business Customer

error.tooShort=Value is too short: minimum length is {0} characters

0 comments on commit 988d6c3

Please sign in to comment.