jquery - Validating form with Model State on Client Side in MVC -


i trying validate form on button click. form (view) bounded model , model properties wrapped data-annotations, before other action, want validate form jquery.

$("#btnsubnext,#btnsublast").on('click', function () {         $("#myform").validate();         if ($('#myform').valid()) {          }     }); 

but not working properly.

note: myform id of form mentioned below:

@using (html.beginform("cceaddupdateschedulea", "cceschedule", formmethod.post, new {  @id = "myform", @name = "myform", @class = "myform" }))     {..... } 

do have clientvalidationenabled , unobtrusivejavascriptenabled true in web.config? need jquery.validate , jquery.validate.unobstrusive. check http://www.asp.net/mvc/overview/older-versions/creating-a-mvc-3-application-with-razor-and-unobtrusive-javascript


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -