Created
April 15, 2019 19:04
-
-
Save rswilley/c2d9f5cc28c91e4cd8ca63106d10dac9 to your computer and use it in GitHub Desktop.
Knockout + Bootstrap Radio Buttons with KO Validation Example
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
<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