ASP .NET MVC Disable Client Side Validation at Per-Field Level

后端 未结 7 2097
梦毁少年i
梦毁少年i 2020-11-27 02:50

I\'m using ASP .NET MVC 3 with Data Annotations and the jQuery validate plugin.

Is there a way to mark that a certain field (or certain data annotation) should only

7条回答
  •  囚心锁ツ
    2020-11-27 03:31

    If you want to remove validations in MVC5 client-Side you need to do the following:

    $("#Email").rules("remove", {
                            "required",
                            "minlength",
                            "email"                           
                            }
                        });
    

提交回复
热议问题