Ryan Sonnek wrote:
I'd appreciate anyone interested to take a look and let me know what they think.

You currently setRequired(true) on a NotEmpty, which isn't what that intends at all.

It's purpose is to make sure a String is length > 0, or a collection has more than zero elements.

Similarly, the Length element can and probably should be using a StringValidator for a TextField and not setting maxlength. Maybe it should do both. ;-)

It strikes me we probably need a:

Hibernate Validator Attribute + Component type -> Validator mapping

...because what sort of validator you want to use will be dependent on the component type.

Al

Reply via email to