angular-auto-validate
angular-auto-validate copied to clipboard
Correct icons for select, check and radio + Add support for bootstrap checkbox and radio buttons + add support for specific help-block container
First thanks for your work !
This pull request is for:
- adding support for bootstrap checkbox and radio buttons group. For example, this can be added easily in your angular app using angular-strap module
- remove insertion of validationState icons for radio, checkbox and select element. This avoid wired display for this kind of input since according to bootstrap documentation:
Feedback icons only work with textual elements.
- add a new feature for inserting
help-blockin specific place. Sometime it can be useful to be able to set precisely where thehelp-blockshould be added if element becomes invalid. Now you can just put a container withhelp-block-contclass inside theform-groupto force thehelp-blockto be added in it. It is particularly useful with horizontal forms with grid structure. Example:
<div class="form-group">
<label for="xxx" class="col-sm-5 control-label">Label_XXX</label>
<div class="col-xs-6 col-sm-2">
<input id="xxx" name="xxx" ng-model="vm.xxx" type="number" class="form-control" required>
</div>
<div class="col-xs-6 col-sm-5">
<p class="form-control-static">more text</p>
</div>
<div class="clearfix"></div>
<div class="col-xs-12 col-sm-7 col-sm-offset-5 help-block-cont"></div>
</div>
Cordially and sorry for my english...