vendredi 20 février 2015

Validation message not found

I'm trying to implement a custom error message for my bean validation. I've annotated my field firstName with the validation rule @Size( min = 2, max = 40, message = "errors.firstName.size" ).


In my message.properties I added a message key errors.firstName.size=First Name must be between {min} and {max} chars. However, in my Thymeleaf generated view just the message key appears (as the screenshot shows).


Wrong message key


Aucun commentaire:

Enregistrer un commentaire