Hi, does anyone know of a validation method in struts that can use your JPA (or other usage agnostic) annotations to validate the values on form fields? For example, if I have specified a max length on an entity property and a mandatory option on another then when updating / creating that entity via a struts action it would be handy to have these already defined constraints taken into account.
I know Empire-DB from the incubator achieves this with its Struts2 extension but is something similar available for JPA? Ideally I would like to add the data validation directly on the entity model (or DTOs where required) so that I can validate consistently regardless of whether the data changes come from a Struts action, a web service or a remote call. As apps progress and we have web forms, web services, updates from mobile apps etc. adding duplicated validation using different methodologies becomes a real chore. I would be happy to 'pollute' my entity model with validation annotations if the annotations could be utilised by a range of frameworks. Cheers, Marcus