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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -