Matt,
You litteraly used the custom validation rule that I gave just for
example, it was to follow that line, but that method it's to verify if
that field it's greater than a number, used for minAge.
so when I put:
rules: {
minAge: 18
}
If you analyze, they return if the value it's greater
Thanks guys. I really appreciate all the help.
I'm still stuck, though. I can't get anything to work now, although I
can't seem to figure out why. I'm definitely not a programmer, so
please be gentle, though feel free to explain things to me like I'm a
5 year-old. I won't be offended. :-)
populated. Should be - but be sure!! Hope that helps Matt!!
Regards,
Alletha
-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf
Of Matt Riley
Sent: Tuesday, 30 June 2009 2:27 AM
To: jQuery (English)
Subject: [jQuery] Re: (validate) Radio button
Matt,
How I said, you should try:
jQuery.validator.addMethod(correctAnswer, function(value, element,
params) {
return this.optional(element) || value == params;
}, Select the correct answer to move on.);
So you can make:
$(quiz_form).validate({
rules: {
correctAnswer: 1
}
});
Just these 3
Heya Matt
Looks like you have created the custom method for the validation, but
you are not calling it anywhere. You are still setting the validation
method to be the default required.
You need to add the method as a class to the element (as you did
originally) or specify it as a rule in the
Hello,
If you need a simple solution to this you should consider create a new
validation rule for the validate plugin, it's easy...
this it's a example how to create a rule to verify its the age its
greater than 18:
jQuery.validator.addMethod(minAge, function(value, element, params)
{
Alexandre, this sounds like it would do pretty much what I need. I
followed your post but I can't seem to get it working. Can you look at
the code below and tell me where I've gone wrong? Sorry to ask for all
the help but I think I'm kind of close and I just want to get it
done! :-)
script
well like many things this has a variable answer...
but what I think you will need to do is write a script that gets the
correct answer (I would use ajax calls to server so the answer can not
be seen in the browser code)
then set an event on the submit button that cycles through your radio
Thanks for your reply. I'm going to give it a go with what you
suggested, although I'm not exactly a seasoned pro at this so I will
probably get stuck and come back begging for more help. :-)
I should have mentioned that this thing needs to run locally from a
user's hard disk without a
Yeah, like I thought, I'm back again. ;-)
Below is the code I've been cobbling together from your previous post.
Please feel free to slap me around and tell me where I've done bad.
Right now, the form validation works fine (if there is nothing
selected then the jquery validation comes up).
10 matches
Mail list logo