Forked from chadedrupt/bootstrap.knockout.validation.js
Last active
August 29, 2015 14:23
-
-
Save gregoryagu/6cf35e2d8a0eb36431f7 to your computer and use it in GitHub Desktop.
Updated for Bootstrap 3.3.5 and KO 3.3.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ko.validation.init({ | |
insertMessages: true, | |
decorateInputElement: true, | |
errorElementClass: 'has-error', | |
errorMessageClass: 'help-block' | |
}); | |
this.first = ko.observable("Greg").extend({ required: true }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form-group" data-bind="validationElement: first"> | |
<label for="inputFirst">First Name</label> | |
<input class="form-control" id="inputFirst" type="text" data-bind="value: first" maxlength="100" /> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment