samedi 6 avril 2019

Show Error message inside a div validation.js

I have a form where i would like to show error message just below the input tag and it works , but when the error message shows they shift the form input down a bit which messes up with the UI . To avoid that i created a label tag and showed the error message . but when i type in the right input validaion.js puts on a display none to that label and hence the input tag again shifts down.

enter image description here

Here is my code

<div class="">
   <span class="  card_content">Full Name</span>
   <input type="text" name="full_name" class="input_block  card_content input_inline_mobile" placeholder="Full Name" required="required">
   <label id="full_name-error" class="error" for="full_name">&nbsp;</label>
</div>
<div class="">
   <span class="  card_content">Mobile</span>
   <input type="text" name="mobile" class="input_block  card_content input_inline_mobile" placeholder="Mobile" required="required">
   <label id="mobile-error" class="error" for="mobile">&nbsp;</label>
</div>



Aucun commentaire:

Enregistrer un commentaire