Hi!
I have a simple request:
If I persist a Company class (via EntityManager) it throws a javax.validation.ConstraintViolationException
which is O.K. (@Length to short, works if @Length of attribute is O.K.)!
But with:
Code:
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
Validator validator = factory.getValidator();
validator.validate(company);
I can get errors. All errors on the attribute (length is to short AND length is to long - even if the length is valid). I am to dumb to understand this behaviour...
Can anybody explain me what's going on there? Or is there a
real example (Spring 3 / Hibernate / JPA with annotations) around?
Thank you very much in advance!Regards,
Anton