A validator works by throwing a ValidationException. So my logical conclusion is that if you have multiple validators applied to one item they'd all get added to the component tree and all get invoked (although you should not assume any particular order of execution). If and ONLY if all validators are happy (don't throw exception), then the field passes.
If more than one validator would throw an Exception, then it MIGHT be the case that each exception is logged to the JSF messages queue - meaning that every validator is invoked and processed in its own error context instead of the less-friendly one-strike/you're out alternative. But then again, it might not.
According to me in an earlier question of this type, JSF was definitely set up to handle what you are asking about, even if the exact details haven't been spelled out.
Regardless, if you write a validator, it should neither maintain state or have side-effects. All it should do is check for validity and throw an exception if the check fails.
An IDE is no substitute for an Intelligent Developer.
posted 1 year ago
Hi, Tim. Thanks for your response.
I also find an example saying that one component can have multiple validators:https://stackoverflow.com/questions/4980616/multiple-validators-for-one-input
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
ScroogeXHTML 8.0 - RTF to HTML5 and XHTML converter