Hey There I have the following code which looks ok to me (but i'm new to MVC), when I tab out of the combobox or submit the form no validation messages are displayed. After submitting to controller, the modelstate.Valid is True.
VIEW
<div class="field-label">
@Html.LabelFor(model => model.Name.TitleID)
</div>
<div class="feild-Entry">
@(Html.Kendo().ComboBoxFor(model => model.Name.TitleID)
.DataTextField("Description")
.DataValueField("ID")
.BindTo(Model.Titles)
)
@Html.ValidationMessageFor(model => model.Name.TitleID)
</div>
MODEL - Title Propery in Name Object
[Range(1, 5000) ]
[RequiredAttribute]
public int TitleID { get; set; }
HTML Output
<!-- Title-->
<div class="field-label">
<label for="Name_TitleID">TitleID</label>
</div>
<div class="feild-Entry">
<input data-val="true" data-val-number="The field TitleID must be a number." data-val-range="The field TitleID must be between 1 and 5000." data-val-range-max="5000" data-val-range-min="1" data-val-required="The TitleID field is required." id="Name_TitleID" name="Name.TitleID" type="text" value="0" /><script>
jQuery(function(){jQuery("#Name_TitleID").kendoComboBox({dataSource:[{"ID":0,"Code":null,"Description":"Not Selected"},{"ID":20,"Code":"","Description":"Captain"},{"ID":9,"Code":"","Description":"Dr"},{"ID":21,"Code":"","Description":"Judge"},{"ID":15,"Code":"","Description":"Miss"},{"ID":2,"Code":"","Description":"Mr"},{"ID":6,"Code":"","Description":"Mrs"},{"ID":19,"Code":"","Description":"Ms"},{"ID":23,"Code":"","Description":"President"},{"ID":27,"Code":"","Description":"Professor"},{"ID":22,"Code":"","Description":"Reverend"},{"ID":16,"Code":"","Description":"Sir"}],dataTextField:"Description",dataValueField:"ID"});});
</script>
<span class="field-validation-valid" data-valmsg-for="Name.TitleID" data-valmsg-replace="true"></span>
</div>
But no client side validation is displayed for the combo box, other text based input boxes show their validation i.e required etc...
Please Help, Im not sure whats going on here!!!