Skip to content

Instantly share code, notes, and snippets.

@chadedrupt
Last active February 27, 2016 17:13
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chadedrupt/5746011 to your computer and use it in GitHub Desktop.
Save chadedrupt/5746011 to your computer and use it in GitHub Desktop.
Use Bootstrap's error stying with knockout validation
ko.validation.configure({
insertMessages: true,
decorateElement: true,
errorElementClass: 'error',
errorMessageClass: 'help-inline'
});
<div class="control-group" data-bind="validationElement: Description">
<label class="control-label" for="inputDescription">Description</label>
<div class="controls">
<input id="inputDescription" type="text" data-bind="value: Description" maxlength="100" required />
</div>
</div>
@MattyBearBytes
Copy link

Awesome - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment