If you're using the Metadata plugin and inline rules:

<input type="text" id="a" class="{validate:{required:'#b:blank'}}" />
<input type="text" id="b" class="{validate:{required:'#a:blank'}}" />

I've not actually tested it but it should work.

On Oct 11, 4:37 am, Phper <hi.steven...@gmail.com> wrote:
> There are two input fields in a form, but only one of them is
> required, they are not required at the same time. Either A or B is
> required. ( A is required  OR B is required). In other words, a user
> can input data to field A, or he can input data to filed B, but he can
> not input data to Both A and B at the same time.
>
> How to implement this constraint in Jquery form validation?

Reply via email to