struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve" <>
Subject 1.1-rc1 and Validator
Date Wed, 19 Mar 2003 14:27:04 GMT
I have just recently begun to utilize the validator in our application
and had I simple question that I could not find an answer to searching
the archives.
I have a search form that a user can enter in 1..n criteria for
searching. In a simple case there are two input fields. The validation
should ensure that at least one of the fields are populated prior to
submitting the form. How would I configure my validation.xml for this
case? I currently have the following:

 <form name="TestSearchForm">
            <msg name="required" key="errors.required"/>
            <arg0 key="searchForm.someCriteria"/>
            <arg1 name="minlength" key="${var:minlength}"

      <field property="otherCriteria"
		<msg name="required" key="errors.required"/>
            <arg0 key="searchForm.otherCriteria"/>

Which works exactly as you would expect requiring that both fields are
populated. Thanks.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message