diff --git a/jqBootstrapValidation.js b/jqBootstrapValidation.js index 976b120..62c394a 100644 --- a/jqBootstrapValidation.js +++ b/jqBootstrapValidation.js @@ -85,10 +85,16 @@ $helpBlock = $controlGroup.find(".help-block").first(), $form = $this.parents("form").first(), validatorNames = []; + + if($helpBlock.length == 0)$helpBlock = $controlGroup.find(".help-inline").first(); // create message container if not exists - if (!$helpBlock.length && settings.options.autoAdd && settings.options.autoAdd.helpBlocks) { - $helpBlock = $('
'); + if (!$helpBlock.length && settings.options.autoAdd && (settings.options.autoAdd.helpBlocks || settings.options.autoAdd.helpInline)) { + if(settings.options.autoAdd.helpInline){ + $helpBlock = $(''); + }else{ + $helpBlock = $('
'); + } $controlGroup.find('.controls').append($helpBlock); createdElements.push($helpBlock[0]); }