Asp.net MVC client side model validations step by step
Asp.net MVC client side model validations
In this post am going to explain you about client side model validations in asp.net MVC
in MVC 2.0 or avove versions we have bunch of features that we can enable many features at client side
in that one of the most important and useful was model validation at client side with help of unobtrusive validation jquery.
with this unobtrusive jquery we can do the validations based on the data annotations which are applied on the model classes.
In order to enable client side model validation we need a two jquery references see the image bellow
in MVC 2.0 we need to add these two references
If you are in MVC 3.0 or avove use
"~/Scripts/jquery.unobtrusive.js",
"~/Scripts/jquery.validate.js"
here is the step by step implementation for client side model validation see bellow
hope this will helps you
In this post am going to explain you about client side model validations in asp.net MVC
in MVC 2.0 or avove versions we have bunch of features that we can enable many features at client side
in that one of the most important and useful was model validation at client side with help of unobtrusive validation jquery.
with this unobtrusive jquery we can do the validations based on the data annotations which are applied on the model classes.
In order to enable client side model validation we need a two jquery references see the image bellow
in MVC 2.0 we need to add these two references
If you are in MVC 3.0 or avove use
"~/Scripts/jquery.unobtrusive.js",
"~/Scripts/jquery.validate.js"
here is the step by step implementation for client side model validation see bellow
hope this will helps you