This is a migrated thread and some comments may be shown as answers.

unobtrusive validation

3 Answers 651 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
comgiu
Top achievements
Rank 2
comgiu asked on 28 Sep 2012, 02:49 PM
HI,
I've write this
but for kendo control doesn't wok why?

@(Html.Kendo().NumericTextBoxFor(m => m.size)
                              .Min(1)
                              .Decimals(0)
                              .Format("{0:D}")
                              .Spinners(false)
                )
                @Html.ValidationMessageFor(m => m.size)

thanks

3 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 03 Oct 2012, 01:15 PM
Hello Giuliano,

Basically if you have added the input element inside a form element and you have included the needed scripts:
jquery.validate.js
jquery.validate.unobtrusive.js"

And you have enabled the MVC options for client side validation:
@Html.EnableClientValidation()
@Html.EnableUnobtrusiveJavaScript()


Just as shown here



All the best,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Kevin Warnke
Top achievements
Rank 1
answered on 27 Jul 2013, 03:03 PM
Petur-

I'm using the Q2 2013 version of Kendo UI for ASP.NET MVC.  I created a brand new project from the Kendo template.

However, when I add the reference to the jQuery.validate and jQuery.validate.unobtrusive scripts, when it tries to perform the client side validation, I get a javascript error in IE 10.  It seems to work okay in Chrome and FireFox.

Is there a set of 1.. 2.. 3.. steps somewhere that shows us how to set up ASP.MVC client side validation to work while using Kendo UI?

Thanks,
Kevin
0
Petur Subev
Telerik team
answered on 31 Jul 2013, 02:02 PM
Hello,

No we do not have tutorials how to include third party libraries such as jQuery validate. I can suggest you to check the Kendo validator which is part of the Kendo framework.

http://docs.kendoui.com/getting-started/framework/validator/overview

http://demos.kendoui.com/web/validator/index.html

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
NumericTextBox
Asked by
comgiu
Top achievements
Rank 2
Answers by
Petur Subev
Telerik team
Kevin Warnke
Top achievements
Rank 1
Share this question
or