I have the following part of a form code: <div class="form-group"> <div class="input-group"> <input class="form-control" type="email" name="email" placeholder="Your e-mail"> <span class="input-group-addon"> <i class="glyphicon glyphicon-envelope"></i> </span> </div> </div>
When there is some error the formatting of jQueryValidation messes up my layout. I needed the field error to appear in a specific place, so the design would not be compromised. Like that:
I could not understand the process of using errorPlacement. I searched for some things by google with that term, but I'm still in the dark. I'll continue my search. Thanks for the tip.
The js bootstrap file was left there by mistake.Excuse me, I've removed it. Validation is working from the jQuery Validation plugin.
The "jQuery Validation" always creates the error immediately after the input (which is the default).What I would like is for it to create the "off" error of <div class = "input-group"> ... </ div>. Is this possible?
If I could do that, I would not have to mess with the current html and css framework. I saw some things on the web with this code:
errorPlacement: function (error, element) {
error.appendTo (element.parent ("td"). next ("td"). find ("div.error-inner"));
But I can not understand it to add it to my code and make it work.