Has anybody done "either this or that required" validation of a list of items.

Here is what I mean - either phone or email are required for each person

<c:forEach items="#{people}" var="person">
  <af:inputText value="#{person.email}" required="ifPhoneNotEntered"/>
  <af:inputText value="#{person.phone}" required="ifEmailNotEntered"/>
</c:forEach>

I thought about iterating over the list of people in the Invoke
application phase, but then it would be tricky to attach an error
message to the appropriate person row.

Thanks

Martin

Reply via email to