Validate two fields with jQuery Validate?

By looking at the demo page at jquery.bassistance.de/validate/demo you can validate 2 fields that should be equal by using "equalTo": $("#signupForm"). Validate({ rules: { ...snip... password: { required: true, minlength: 5 }, confirm_password: { required: true, minlength: 5, equalTo: "#password" }, ...snip... }, messages: { ...snip... password: { required: "Please provide a password", minlength: "Your password must be at least 5 characters long" }, confirm_password: { required: "Please provide a password", minlength: "Your password must be at least 5 characters long", equalTo: "Please enter the same password as above" }, ...snip... } }) To do it using the class method, you just need to find the syntax. I couldn't find it for the equalTo attribute, but it is probably something like: class="required email equalTo'email'.

By looking at the demo page at jquery.bassistance.de/validate/demo/ you can validate 2 fields that should be equal by using "equalTo": $("#signupForm"). Validate({ rules: { ...snip... password: { required: true, minlength: 5 }, confirm_password: { required: true, minlength: 5, equalTo: "#password" }, ...snip... }, messages: { ...snip... password: { required: "Please provide a password", minlength: "Your password must be at least 5 characters long" }, confirm_password: { required: "Please provide a password", minlength: "Your password must be at least 5 characters long", equalTo: "Please enter the same password as above" }, ...snip... } }); To do it using the class method, you just need to find the syntax. I couldn't find it for the equalTo attribute, but it is probably something like: class="required email equalTo'email'.

Thanks :) it works – Naiimim May 17 at 8:36 Great! If you found this answer to be the correct one, please consider accepting it by clicking the tick mark to the left of it. Thanks – psynnott May 17 at 8:39 done :) thanks again – Naiimim May 17 at 9:10 appreciated, thanks – psynnott May 17 at 12:33.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions