ASP.NET MVC 3 Custom Validation |
Index |
Hands-On Lab
ASP.NET MVC Custom Validation
Lab version:1.1.0
Last updated:10/14/2011
Contents
Overview
Exercise 1: Adding Custom Range Validation Using Validation Attributes
Task 1 � Adding a validation attribute class
Task 2 � Creating the Custom Data Annotation
Task 3 � Running the Application
Exercise 2: Adding Validation at Client Side
Task 1 � Creating a ModelClientValidationRule for price ranges
Task 2 � Adding attribute validation at client side
Task 3 � Adding a JavaScript Function to Perform Client-Side Validation
Task 4 � Modifying the Create View to Execute Client-Side Validation
Task 5 � Running the Application
Exercise 3: Using IValidatableObject Custom Validation
Task 1 � Implementing IValidatableObject Validation Method
Task 2 � Running the Application
Exercise 4: Using Unobtrusive jQuery at Client Side
Task 1 � Running the Application before Enabling Unobtrusive jQuery
Task 2 � Enabling Client Validation from Web.config
Task 3 � Adding Unobtrusive jQuery to Master Page
Task 4 � Running the Application Using Unobtrusive jQuery Validation