Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery Validation Plugin causes input group to have wrong height #16810

Closed
matsava opened this issue Jul 12, 2015 · 4 comments
Closed

jQuery Validation Plugin causes input group to have wrong height #16810

matsava opened this issue Jul 12, 2015 · 4 comments

Comments

@matsava
Copy link

matsava commented Jul 12, 2015

I am using Prepended text for showing a euro sign before the textbox. Also i am using JQuery Validation Plugin (link to the plugin)

When the error message appears under the field the sign of the euro covers 2 lines (the textbox and the error line)

after

The code

<div class="col-md-5">
            <div class="input-group">
              <span class="input-group-addon">€</span>
              <input id="worth" name="worth" class="form-control error" placeholder="" type="text" required=""><label for="worth" generated="true" class="error">error message</label>
            </div>

</div>
@josephfusco
Copy link

Can you post a working example please with jsbin?

@cvrebert
Copy link
Collaborator

Putting a <label> within an .input-group like that is invalid. Please file a bug against the plugin.

@cvrebert cvrebert changed the title Prepended text height bug jQuery Validation Plugin causes input group to have wrong height Jul 12, 2015
@phpdev-expert
Copy link

errorPlacement: function ( error, element ) {

        if(element.parent().hasClass('input-group')){
          error.insertAfter( element.parent() );
        }else{
          	error.insertAfter( element );
        }

},

Use this

@fajarsapwebdev19
Copy link

thank you very much

@twbs twbs locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants