Hello,
I'm using EditorFor Telerik extension for a property that is decorated with [Required] attribute of DataAnnotaion. The control is defined into ajax form (by using Ajax.BeginForm )
My problem is that the client validation doesn't work for this control. When the user remain this field empty and clicks on the submit button, the Post action is executed even though the field is required.
Here is the code that decalre the control:
@Html.Telerik().EditorFor(model => model.Description).Name("Description").Encode(false).HtmlAttributes(new { style = "float: left; width: 345px;" }).Tools(tools => tools.Clear().Bold().Italic().Underline().Separator().CreateLink().Unlink())
@Html.ValidationMessageFor(model => model.Description)
When I replace it to simple Html textbox, It works perfect:
@Html.TextBoxFor(model => model.Description)
@Html.ValidationMessageFor(model => model.Description)
* I'm using in the same page the CurrencyTextBoxFor extensin and it is work perfectly
* I tried replace the ajax form to html form but it also doesn't work.
What can be the reason of this behavior?
Thanks,
Yocheved.