jquery-validation-unobtrusive-bootstrap icon indicating copy to clipboard operation
jquery-validation-unobtrusive-bootstrap copied to clipboard

Not playing nice with custom radio's and checkboxes, especially inline

Open ghost opened this issue 6 years ago • 1 comments
trafficstars

Just ran into this awesome add-on, that saved me a lot of headaches. Just wanted to let you know that is doesn't really play nicely with the custom-control's for radio and checkboxes. Especially the inline one's get messed up. 2019-10-05_18-43-56

ghost avatar Oct 05 '19 16:10 ghost

At https://github.com/brecons/jquery-validation-unobtrusive-bootstrap/blob/master/dist/unobtrusive-bootstrap.js#L27

Need to replace this block with something like this:

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

helluvamatt avatar Mar 31 '20 22:03 helluvamatt