You can use one validator to target multiple components as long as the
component IDs you assign are distinct. There should be no problem
using a form-level validator to reach of these fields with
findComponent(id).

<h:inputText id="address1street".../>
<h:inputText id="address1zip".../>
<h:inputText id="address2street".../>
<h:inputText id="address2zip".../>

Is the issue that the address fields are in a dataTable so they don't
have unique IDs? In that case, <h:dataTable> already does for you what
you're trying to do. If you have a component in a column with a
validator attribute, it will call the vaildator for each row. Inside
the validator, findComponent("street1") will return the instance of
the component with ID=street1 for the current row.

It might help for you to post a simplified form and the validation
method you were originally trying to use.

HTH,
/dmc

Reply via email to