Linked Questions

Popular Questions

Jquery form validation - pop up to specific checkbox

Asked by At

I use Jquery form validation. Before visitor submit i need to check the 'Terms&Cond' checkbox. If not checked i would like to see the message an alert box. (other messages shown near in the textboxes)

How to set this? I try this:

 $("#myform").validate({
      errorPlacement: function(error, element) {
            if ( element.is(":checkbox") ) {
                alert(error.html());
            }
            },
        rules: {
            name: {
                required: true,
                minlength: 3,
                maxlength: 40,
                lettersonly: false
            },
            ad: {
.....

But this did not work.

Thank you for help.

Related Questions