This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Comment

I am kinda wondering if there is any other way to define validations, for example, if you have more than one set of validations for a particular object.

There is a way to do this. Unfortunately, the documentation sucks (I wrote it, I can say that :lol: ). Look at NamedBeanValidator. You can simply configure a different one for each set of validation rules you want to use:

Comment

dmiller - thanks, that is what I'm looking for... So the NamedBeanValidator, when used with the Validator interface, will always try to validate any object given to it using the validations specificied by its beanName property?

Comment

think you nilesh, i anderstand the problem and i have the solution
so , now, i wnat to validate in client by a regular expression and in the server by an other regular expression ,
because in client i have a string like
"22222,33333,22222"
i must validate with this reg exp:
^[0-9]+(( *|,) *[0-9]+)*$
in hte server part i have a property editor whitch parse a String and make a Set .
i must validate evry Instance on this set.
i try this code:
--validation.xml--