[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Phper
Also, how to prevent a user filling out both fields? On Oct 12, 4:48 pm, Phper wrote: > How to change the default position of an error message in Jquey form > validation plugin? > > On Oct 12, 4:33 pm, Gordon wrote: > > > If you're using the Metada

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Phper
Also, how to prevent a user filling out both fields? On Oct 12, 4:48 pm, Phper wrote: > How to change the default position of an error message in Jquey form > validation plugin? > > On Oct 12, 4:33 pm, Gordon wrote: > > > If you're using the Metada

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Phper
How to change the default position of an error message in Jquey form validation plugin? On Oct 12, 4:33 pm, Gordon wrote: > If you're using the Metadata plugin and inline rules: > > > > > I've not actually tested it but it should work. > > On Oct 11, 4:37 am,

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Phper
. If possible could you use radio > buttons for those two choices in your HTML? In a radio button group > selecting one automatically deselects other buttons in the group. Then you > could just use one of the built in validation checks, as you already have > done, to make sure one is che

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-11 Thread Phper
or days, but not both" > )[/code] note change XOR to whatever method you decide to use. > > Then add the check to your rules. > DED > > On Mon, Oct 12, 2009 at 12:36 AM, Phper wrote: > > > http://code.jquery.com/jquery-</a> > > latest.js"&

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-11 Thread Phper
tent", "evaluation", "prices" and "multi" are required. All of them are required. But there are additional two fields, which are "participations" and "days". Only one of them is required. Either "participations" or "days"

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-11 Thread Phper
lled out > listen for when A and B have focus, remember if either is checked or ignored > and check to make sure both are not simultaneously filled out. Check this on > submit as well. > > Good luck, > DED > > On Sun, Oct 11, 2009 at 7:42 AM, Phper wrote: > > >

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-11 Thread Phper
al '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

[jQuery] Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-10 Thread Phper
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

[jQuery] Why doesn't the following code work?

2009-10-10 Thread Phper
$(document).ready(function() { $("#form1").validate({ rules: { name: "required",// simple rule, converted to {required:true} title,content, evaluation: { required: true } }, messages: { comment: "Please