Last post Aug 15, 2016 10:08 AM by Fei Han - MSFT
Aug 12, 2016 10:45 AM|gowrifor.net|LINK
I have two sets of radiobuttons
like this :
1. Is less than 32 oYes oNo
2. Is less than 1500 oYes oNo
Now I have to check if any one of these are ticked (either 1 or 2 ). How to do this using Unobtrusive validation?
and one more question is is Fluent validation considered as Unobtrusive validation?
Aug 15, 2016 10:08 AM|Fei Han - MSFT|LINK
Firstly, you could check the following link to install Microsoft jQuery Unobtrusive Validation.
Secondly, please add references to JS files in your web page.
Thirdly, the jQuery Unobtrusive Validation library complements jQuery Validation by adding support for specifying validation options as HTML5 data-* elements. You could refer to the following sample code to create radio button list.
<input type="radio" name="group1" value="one" data-val="true" data-val-required="Please choose one of these options."/>Yes
<input type="radio" name="group1" value="two" />No
<span class="field-validation-valid" data-valmsg-for="group1" data-valmsg-replace="true"></span>
Besides, you could read this article to know how to use Unobtrusive Validation.