You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by np...@skynet.be on 2006/02/06 15:25:19 UTC

Commons Validator -- validate different proporties on the same

Hi,

I'm having trouble trying to use Commons Validator. This is probably a newbie question.

I'm looking to be able to validate different fields on the _same_ form object. The problem is that you can put them in the same validation.xml, since it will be the same form name....  I am using Spring MVC and I use my domain object are form Backing object, so I don't have different objects for each form. Therefore I don't have a dedicated form object per screen...

 My workaround was to create 2 different Factories and therefore 2 different validation.xml files, but the \"fields to be checked\" (ValidatorResources : hFormSet) are always the same. I have checked that by debugging. What's the best approach to that?

Any help would be greatly appreciated!

Nicolas