validation - How can i fix code in jQuery.validator -
i want check validation when user sign up. so, code is
<span class="input_label"> <input type="text" name="firstname" id="firstname" required="required"> <label>first name *</label> </span>
and use jquery.validator.
after code appeared
<span class="input_label"> <input type="text" name="firstname" id="firstname" required="required"> <label>first name *</label> </span> <div for="firstname" class="tooltip">please enter first name</div>
class="tooltip" add errorclass: 'tooltip', errorelement: 'div',
how have do.. if insert code please enter first name in tag?
take @ messages parameter validate() function config.
$('#form_id').validate({ messages: { firstname: "please enter first name" }, errorclass: 'tooltip', errorelement: 'div' });
you use errorplacement parameter programatically position new element needed.
Comments
Post a Comment