I'm using the Jakarta Validator classes to do some validation on my JavaBeans. The problem is that some of the fields in my bean should only be filled in if other fields in the bean are filled in.
For example my bean consists of the fields:
Now a is always supposed to be there so I know how to check for that. Field b is optional, so I don't need to check whether its there or not, I just need to check its type when it is there. However, if b is there, then c has to be there. Is it possible to check for this using the Validator classes? If so, how would I make my rule?