review updates
This commit is contained in:
parent
e48b29d58c
commit
b3b7e78ce6
|
@ -17,12 +17,13 @@ public class MyMessageInterpolator implements MessageInterpolator {
|
|||
|
||||
@Override
|
||||
public String interpolate(String messageTemplate, Context context) {
|
||||
logger.debug("Selecting the language " + Locale.getDefault() + " for the error message.");
|
||||
messageTemplate = messageTemplate.toUpperCase();
|
||||
return defaultInterpolator.interpolate(messageTemplate, context, Locale.getDefault());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String interpolate(String messageTemplate, Context context, Locale locale) {
|
||||
messageTemplate = messageTemplate.toUpperCase();
|
||||
return defaultInterpolator.interpolate(messageTemplate, context, locale);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,21 +10,21 @@ public class ValidationExamples {
|
|||
private static final Formatter formatter = new Formatter();
|
||||
|
||||
@Size(
|
||||
min = 5,
|
||||
max = 14,
|
||||
message = "The author email '${validatedValue}' must be between {min} and {max} characters long"
|
||||
min = 5,
|
||||
max = 14,
|
||||
message = "The author email '${validatedValue}' must be between {min} and {max} characters long"
|
||||
)
|
||||
private String authorEmail;
|
||||
|
||||
@Min(
|
||||
value = 1,
|
||||
message = "There must be at least {value} test{value > 1 ? 's' : ''} int the test case"
|
||||
value = 1,
|
||||
message = "There must be at least {value} test{value > 1 ? 's' : ''} int the test case"
|
||||
)
|
||||
private int testCount;
|
||||
|
||||
@DecimalMin(
|
||||
value = "50",
|
||||
message = "The code coverage ${formatter.format('%1$.2f', validatedValue)} must be higher than {value}%"
|
||||
value = "50",
|
||||
message = "The code coverage ${formatter.format('%1$.2f', validatedValue)} must be higher than {value}%"
|
||||
)
|
||||
private double codeCoverage;
|
||||
|
||||
|
|
Loading…
Reference in New Issue