[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Jaggi

oOps thinks that wrong:

$(input[name='emailAddress.emailRepeated']).rules(add, {
equalTo: #emailAddress.email
});

i think you get the idea though.

On Oct 15, 2:07 pm, Jaggi jaggi_2...@hotmail.com wrote:
 I had this problem recently but the only way i managed to get around
 it was to do it via the custom caller. So for you you'd do:

         $(input[name='emailAddress.email']).rules(add, {
                 equalTo: #emailAddress.email
         });

 On Oct 15, 12:36 pm, ade ade.godd...@gmail.com wrote:

  HI

  Wondered if someone could help.
  I need to run a equalTo validation check on some inputs that use
  complex ids, they have fullstops in. I am trying to add the rules
  (using quotes also as specified) as per the documentation but it still
  doesnt seem to work. Code is here:

  $(document).ready(function(){

  $(#registrationDetails).validate({
    rules: {
  emailAddress.email: required email,
  emailAddress.emailRepeated: {
    equalTo: #emailAddress.email

  }
    }
  });
  });

  any help here would be great

  thanks in advance

  ade


[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Jaggi

I had this problem recently but the only way i managed to get around
it was to do it via the custom caller. So for you you'd do:

$(input[name='emailAddress.email']).rules(add, {
equalTo: #emailAddress.email
});

On Oct 15, 12:36 pm, ade ade.godd...@gmail.com wrote:
 HI

 Wondered if someone could help.
 I need to run a equalTo validation check on some inputs that use
 complex ids, they have fullstops in. I am trying to add the rules
 (using quotes also as specified) as per the documentation but it still
 doesnt seem to work. Code is here:

 $(document).ready(function(){

 $(#registrationDetails).validate({
   rules: {
 emailAddress.email: required email,
 emailAddress.emailRepeated: {
   equalTo: #emailAddress.email

 }
   }
 });
 });

 any help here would be great

 thanks in advance

 ade


[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Ade Goddard
Thanks Jaggi

Yeah that put me on the right path the below works:

 $(document).ready(function(){
 $(#registrationDetails).validate({
   rules: {
  emailAddress.email: required email,
  emailAddress.emailRepeated: {
equalTo: input[name='emailAddress.email']
  }
   }
});
});

thx again

Ade

On Thu, Oct 15, 2009 at 2:09 PM, Jaggi jaggi_2...@hotmail.com wrote:


 oOps thinks that wrong:

$(input[name='emailAddress.emailRepeated']).rules(add, {
equalTo: #emailAddress.email
});

 i think you get the idea though.

 On Oct 15, 2:07 pm, Jaggi jaggi_2...@hotmail.com wrote:
  I had this problem recently but the only way i managed to get around
  it was to do it via the custom caller. So for you you'd do:
 
  $(input[name='emailAddress.email']).rules(add, {
  equalTo: #emailAddress.email
  });
 
  On Oct 15, 12:36 pm, ade ade.godd...@gmail.com wrote:
 
   HI
 
   Wondered if someone could help.
   I need to run a equalTo validation check on some inputs that use
   complex ids, they have fullstops in. I am trying to add the rules
   (using quotes also as specified) as per the documentation but it still
   doesnt seem to work. Code is here:
 
   $(document).ready(function(){
 
   $(#registrationDetails).validate({
 rules: {
   emailAddress.email: required email,
   emailAddress.emailRepeated: {
 equalTo: #emailAddress.email
 
   }
 }
   });
   });
 
   any help here would be great
 
   thanks in advance
 
   ade



[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread elubin

this initial example probably didn't work because of the period.
there is a documented way to use periods in jquery... in the FAQ
section How do I select an element that has weird characters in its
ID? 

http://docs.jquery.com/Frequently_Asked_Questions

eric



On Oct 15, 7:36 am, ade ade.godd...@gmail.com wrote:
 HI

 Wondered if someone could help.
 I need to run a equalTo validation check on some inputs that use
 complex ids, they have fullstops in. I am trying to add the rules
 (using quotes also as specified) as per the documentation but it still
 doesnt seem to work. Code is here:

 $(document).ready(function(){

 $(#registrationDetails).validate({
   rules: {
 emailAddress.email: required email,
 emailAddress.emailRepeated: {
   equalTo: #emailAddress.email

 }
   }
 });
 });

 any help here would be great

 thanks in advance

 ade


[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Ade Goddard
Yeah i was aware of that but thought that the quoting within the rules
method would overide it:) Glad its fixed now

thx

On Thu, Oct 15, 2009 at 2:33 PM, elubin elu...@yahoo.com wrote:


 this initial example probably didn't work because of the period.
 there is a documented way to use periods in jquery... in the FAQ
 section How do I select an element that has weird characters in its
 ID? 

 http://docs.jquery.com/Frequently_Asked_Questions

 eric



 On Oct 15, 7:36 am, ade ade.godd...@gmail.com wrote:
  HI
 
  Wondered if someone could help.
  I need to run a equalTo validation check on some inputs that use
  complex ids, they have fullstops in. I am trying to add the rules
  (using quotes also as specified) as per the documentation but it still
  doesnt seem to work. Code is here:
 
  $(document).ready(function(){
 
  $(#registrationDetails).validate({
rules: {
  emailAddress.email: required email,
  emailAddress.emailRepeated: {
equalTo: #emailAddress.email
 
  }
}
  });
  });
 
  any help here would be great
 
  thanks in advance
 
  ade



[jQuery] Re: not equalTo ?

2008-11-17 Thread [EMAIL PROTECTED]

sorry for double posting it, but i'm really stuck on this one and
can't go on with the project until it's done :(

On Nov 17, 6:03 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi everyone, i'm new to jQuery and yesterday i got into a little issue
 with form validation.

 What i want to do is to check if username and password fields are
 having the same input, but I haven't found a solution to do this.

 Is there any way to make equalTo 'nagative' so if user enters the same
 username and password, form doesn't validate ?


[jQuery] Re: not equalTo ?

2008-11-17 Thread Jörn Zaefferer
I recommend to write a custom method:
http://docs.jquery.com/Plugins/Validation/Validator/addMethod

A reference implementation, which also checks the password quality,
can be found here:
http://jqueryjs.googlecode.com/svn/trunk/plugins/validate.password/jquery.validate.password.js

Jörn

On Mon, Nov 17, 2008 at 6:05 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 sorry for double posting it, but i'm really stuck on this one and
 can't go on with the project until it's done :(

 On Nov 17, 6:03 pm, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
 Hi everyone, i'm new to jQuery and yesterday i got into a little issue
 with form validation.

 What i want to do is to check if username and password fields are
 having the same input, but I haven't found a solution to do this.

 Is there any way to make equalTo 'nagative' so if user enters the same
 username and password, form doesn't validate ?


[jQuery] Re: not equalTo ?

2008-11-17 Thread Kemal Delalić

Thank you for your answer Jörn, i just added an notequalTo method
like;

notequalTo: function(value, element, param) {
return value != $(param).val();
}

and the corresponding message, it works like a charm. This password
quality 'plugin' is tested to be working with your validation ?

On Nov 17, 6:09 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 I recommend to write a custom 
 method:http://docs.jquery.com/Plugins/Validation/Validator/addMethod

 A reference implementation, which also checks the password quality,
 can be found 
 here:http://jqueryjs.googlecode.com/svn/trunk/plugins/validate.password/jq...

 Jörn

 On Mon, Nov 17, 2008 at 6:05 PM, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:

  sorry for double posting it, but i'm really stuck on this one and
  can't go on with the project until it's done :(

  On Nov 17, 6:03 pm, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
  Hi everyone, i'm new to jQuery and yesterday i got into a little issue
  with form validation.

  What i want to do is to check if username and password fields are
  having the same input, but I haven't found a solution to do this.

  Is there any way to make equalTo 'nagative' so if user enters the same
  username and password, form doesn't validate ?


[jQuery] Re: not equalTo ?

2008-11-17 Thread Jörn Zaefferer
Yes, I'm using that on my own application. I've got the same rating
implemented in Java to do the same validation on the serverside
without having to use ajax.

Jörn

On Mon, Nov 17, 2008 at 11:08 PM, Kemal Delalić [EMAIL PROTECTED] wrote:

 Thank you for your answer Jörn, i just added an notequalTo method
 like;

notequalTo: function(value, element, param) {
return value != $(param).val();
}

 and the corresponding message, it works like a charm. This password
 quality 'plugin' is tested to be working with your validation ?

 On Nov 17, 6:09 pm, Jörn Zaefferer [EMAIL PROTECTED]
 wrote:
 I recommend to write a custom 
 method:http://docs.jquery.com/Plugins/Validation/Validator/addMethod

 A reference implementation, which also checks the password quality,
 can be found 
 here:http://jqueryjs.googlecode.com/svn/trunk/plugins/validate.password/jq...

 Jörn

 On Mon, Nov 17, 2008 at 6:05 PM, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:

  sorry for double posting it, but i'm really stuck on this one and
  can't go on with the project until it's done :(

  On Nov 17, 6:03 pm, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
  Hi everyone, i'm new to jQuery and yesterday i got into a little issue
  with form validation.

  What i want to do is to check if username and password fields are
  having the same input, but I haven't found a solution to do this.

  Is there any way to make equalTo 'nagative' so if user enters the same
  username and password, form doesn't validate ?


[jQuery] Re: [validate] equalTo for empty field values too?

2008-03-09 Thread Jörn Zaefferer


Drakanor schrieb:

Is there a way to use equalTo with empty fields (if they are not
required, they are equal when empty). So far I have found examples of
equalTo used together with required option only.
  

equalTo should work just fine without required.

Jörn