Martin,
One solution might be to create a custom validator for this. You might
want to take a look at
org.apache.myfaces.custom.equalvalidator.EqualValidator for an example
on how to access another component than the one you defined the
validator for.
Hope this helps,
Gert Vanthienen
[EMAIL PROTECTED]
Martin Denham wrote:
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