generate « Validation « JPA Q&A





1. Generating a error code per property in Hibernate Validator    stackoverflow.com

I am looking at using Hibernate Validator for a requirement of mine. I want to validate a JavaBean where properties may have multiple validation checks. For example:

class MyValidationBean
{
   ...

2. Generating validation code    forum.hibernate.org

Hibernate version: 2.1.4 Is there any way to add validation to the automatically created java classes based on the type and length fields? Currently the problem is that the values persisted to the database are being truncated to 2 characters but the cached objects are not truncated. If there is not a way to automatically create this validation, where is this ...