I am using Hibernate validator for form validation in my web-app. I am using the @Length annotation for my String attribute as follows:
@Length(min = 5, message
According to documentation, you can use @Length(min=, max=), with one message. Then just change your message to "The field must be between 5 and 50 characters"
@Length(min=, max=)