>
>      <field-validator type="conditionalvisitor">

            (checkbox == true) and (textbox).equals("")
>


Unless u wrote ur custom validator dealig the 'checkbox == true' comparison,
by default these type of comparisons will not work.

You have to specify the check box's value (check box based which you want to
perform conditional validation) rather 'true' (coz when the server receives
request the form values will hold the name-value pairs, but not the
checked/unchecked or true/false details).

So the correct logic would be turned into something like,

        <field-validator type="fieldexpression">
            <param name="expression">
            <![CDATA[((check_box != "cbVal") || (depending_field !=
"fieldVal"))]]></param>
            <message>Some error message</message>
        </field-validator>

If u use the above 'fieldexpression' validator, if the first condition is
evaluated to true i.e, if the check box is not checked, then the second
expression will not be evaluated.

Comparision may be altered using && also with first expression's comparision
reversed.

Hope this helps.

ManiKanta

Reply via email to