Since the problem is quite complex, I have included a sample project in attachment to reproduce the problem. I had to leave out the downloaded NuGet packages, Content/kendo and Scripts/kendo to get the zip under 2 Mb. I thrust you can get it working again. If not, it is basically an MVC5 project with KendoUI added, a model, and some changes to the HomeController and its _Layout and Index views.
Due to the combination of Kendo UI NumericTextBox, jquery validation, server-side model validation, the numeric text box disapears.
Steps to reproduce with solution in attachment:
- Run the project ;-)
- Click Post
- Empty the non-Telerik textbox
- Click Post again
- Watch the NumericTextBox disappear.
My analysis so far:
- In the first postback, client-side validation doesn't find an error, but server side validation does (the NumericTextBox is required)
- Then, with the second postback, client-side validation does find an error with the non-Telerik textbox, but not with the NumericTextBox
- jQuery validation empties all spans with the class "input-validation-error", where it can no longer find a validation error
- the initialised NumericTextBox fits this description, so the span is emptied, making the NumericTextBox disappear.
My questions:
- Why doesn't the "Required" error get caught on client-side validation?
- How do we keep the described side effect from happening for cases where we verify certain business rules on server-side only?
Due to the combination of Kendo UI NumericTextBox, jquery validation, server-side model validation, the numeric text box disapears.
Steps to reproduce with solution in attachment:
- Run the project ;-)
- Click Post
- Empty the non-Telerik textbox
- Click Post again
- Watch the NumericTextBox disappear.
My analysis so far:
- In the first postback, client-side validation doesn't find an error, but server side validation does (the NumericTextBox is required)
- Then, with the second postback, client-side validation does find an error with the non-Telerik textbox, but not with the NumericTextBox
- jQuery validation empties all spans with the class "input-validation-error", where it can no longer find a validation error
- the initialised NumericTextBox fits this description, so the span is emptied, making the NumericTextBox disappear.
My questions:
- Why doesn't the "Required" error get caught on client-side validation?
- How do we keep the described side effect from happening for cases where we verify certain business rules on server-side only?