I'm having a problem with my application and @Max
constraint annotation.
My controller method is defined like this:
public static void save(@Required @Max(255) String content)
Later in my code I have error check:
if (Validation.hasErrors()) {
render("Foo/bar.html", content);
}
The thing is, no matter what I post in the form (if it violates or not the constraint) I'm always getting error message that Cannot be greater than 255
.
This is the text I'm, using for testing, 119 characters long: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ipsum enim, rhoncus eget volutpat at, posuere non eros.
Anyone had similar problem and knows how to solve it?