Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I create validators or transformers which apply to more than one piece of data at a time?

0
Posted

Can I create validators or transformers which apply to more than one piece of data at a time?

0

Yes, you can. You could for example create a validator that compares two integer values, and then use it to validate whether a certain int field in a javabean is higher than another one or not. This would allow you to validate on data values more than on data formats, even establishing dependencies among your different pieces of data, something necessary many times. The only thing you need to do this is develop a validator or transformer which receives more than one data parameter and then process this parameters at your wish in the validator code.

Related Questions

Thanksgiving questions

*Sadly, we had to bring back ads too. Hopefully more targeted.