I am using the validation plugin 1.2.1 and jquery 1.2.3
The problem is that the error containers are added, but:
a) not removed when the user enters the correct data and moves to the
next field
b) more importantly, if the user clicks submit again, another error
element added (yes, an extra one)

here is my code:

<script type='text/javascript'>
              $().ready(function() {
                $('#signupform').validate({
                    errorElement: 'div',
                                rules: {
                                        name: {
                                                required: true,
                                                minlength: 2
                                        },
                                        email: {
                                                required: true,
                                                email: true
                                        },
                                        phone: {
                                                required: true,
                                        }
                                },

                                messages: {
                                        name: {
                                                required: 'Please enter your 
name',
                                                minLength: 'Your name must 
consist of at least 2
characters'
                                        },
                                        email: 'Please enter a valid email 
address',
                                        phone: 'Please enter your phone number'
                                }
                        });
                $('input.phone').mask('(999) 999-9999',
{placeholder:'_'});
               });
            </script>

Reply via email to