Skip to content

Instantly share code, notes, and snippets.

@rswilley
Created April 15, 2019 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rswilley/c2d9f5cc28c91e4cd8ca63106d10dac9 to your computer and use it in GitHub Desktop.
Save rswilley/c2d9f5cc28c91e4cd8ca63106d10dac9 to your computer and use it in GitHub Desktop.
Knockout + Bootstrap Radio Buttons with KO Validation Example
<label class="ov-label">Options</label>
<div data-bind="foreach: optionList, validationOptions: {insertMessages: false}">
<div class="radio">
<label>
<input data-bind="checked: $parent.selectedOptionId, value: id" type="radio" name="optionGroup">
<!-- ko text: name --><!--/ko-->
</label>
</div>
</div>
<span class="validationMessage" data-bind="validationMessage: selectedOptionId"></span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment