Hello,

 

I was wondering if there is a way to do global validation on entities
without using @validate in the entity.

 

If I have:

 

Public class user{

 

@Validate("required")

Private string username;

Private string password;

 

Getters/setters

}

 

I want to be able to replace the @Validate("required") by putting it
somewhere that it is global to the application, maybe like the .properties
file or somewhere.

 

 

The reason I would like to do this is I will be routinely over righting my
entities as I need to regenerate them from hibernate and do not want to put
the validates in that I have already put in as well I do not want to have to
put the validates in the pages each time I use the entity.

 

Thanks,

--James

 

Reply via email to