length « Validation « JPA Q&A





1. How to check for a length of 5 or 9 with hibernate validator?    stackoverflow.com

I can validate the length of a String with an annotation like:

@Length(max = 255)
But what if I want to verifiy that the length is either 5 or 9? Can this ...