ASP.NET MVC 2 Client side validation using jQuery validation plug-in
ASP.NET MVC 2 has validation architecture that support both server-side and client-side validation. ScottGu describes in details how to get validation works in his post ASP.NET MVC 2: Model Validation. The best feature in client-side architecture is that you may use alternative java scripts validation libraries like jQuery validation. There is a steps to get client-side validation works using jQuery validation plug-in:
- Download and add to your ASP.NET MVC project following java scripts:
- Enable client side validation
- write one line of code in the view before form
That's it! Now you have Client-side validation using jQuery validation plug-in!