How to validate multiple fields in JSF?

Viewed 1573

I'm going through validation in JSF and I see lots of examples of very basic logic. Frankly, I put them in the same category where the HelloWorld examples go. I can't imagine placing error messages in xhtml files, using a separate validation method for each validated field or employing bean validation.

What I want to do, is have a single method on the backing bean that will execute validation for each field, logging error messages driven by keys in i18n property files.

Can this be done? If so, how do we register that method as validating method, how do we obtain submitted field values for evaluation, and how do we register error messages?

1 Answers
Related