Hi, javascript has an 'xor' operator. It works just like 'or' in an 'if' statement except in 'xor' only one side can be true. In a normal 'or' statement either side can be true or both can. So you probably want to do something like: if ( A XOR B) { } . Then only one can be true to continue if both are true the statement returns 'false'.Hope this helps. DED
On Sat, Oct 10, 2009 at 10:37 PM, 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?