I'm trying to implement validation on he form , but having issues with radio button.
<div class="form-group row">
@Html.LabelFor(model => model.LanguageID, htmlAttributes: new { @class = "control-label col-md-2 required" })
<div class="col-md-10">
@(Html.Kendo().ComboBoxFor(m => m.LanguageID)
.Name("LanguageID")
.Placeholder(@Resources.Resources.LanguagePlaceholder)
.DataTextField("Description")
.DataValueField("Id")
.Filter("contains")
.Suggest(true)
.DataSource(s => s.Read(r => r.Action("GetLanguages", "Student")).ServerFiltering(false))
.HtmlAttributes(new { style = "width:300px" })
)
@Html.ValidationMessageFor(model => model.LanguageID, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group row">
@Html.LabelFor(model => model.WebsiteDisplay, htmlAttributes: new { @class = "control-label col-md-2 required" })
<div class="form-group k-radio-list">
<div class="checkbox">
@(Html.Kendo().RadioButtonFor(m => m.WebsiteDisplay).Label(@Resources.Resources.Yes).Value(true))
@(Html.Kendo().RadioButtonFor(m => m.WebsiteDisplay).Label(@Resources.Resources.No).Value(false))
@Html.ValidationMessageFor(model => model.WebsiteDisplay, "", new { @class = "text-danger" })
</div>
</div>
</div>
<script>
$(function () {
$("form").kendoValidator();
});
</script>
it does work for combobox and textboxes , but error is not displayed for radio button.
Am I missing something?