views:

32

answers:

1

I try to validate via org.springframework.validation.Validator.

My Problem: I have the a form-bean which has data beans.

PlayerRegistrationDataBean
-> has: PersonBean

So how do I have to validate the PersonBean if I do not want to implement the validation everywhere I use PersonBeans as "sub-beans"?

+1  A: 

I'm not sure am I getting what you're asking about, but won't annotating the PersonBean's properties with proper annotations and then the PersonBean itself with @Valid do the trick?

Zenzen
That is one way I could go, but wanted to be able to use different validations on the same class.So I have choosen the spring-way.
eventhorizon