This example is based on the approach demonstrated in the E3744: How to enable unobtrusive validation for GridView using the EditForm template thread.
Perform the following steps to accomplish this task:
1) Create a ValidationAttribute class descendant.
2) Implement the IClientValidatable interface for this class to enable client side validation.
3) Write a custom adapter based on custom parameters that are passed from the server
4) Add a custom validation method
Below are some threads that may be helpful in accomplishing similar tasks:
Unobtrusive Client Validation in ASP.NET MVC 3
Unobtrusive client validation
Custom Unobtrusive jQuery Validation with Data Annotations in MVC 3
Creating custom unobtrusive file extension validation in ASP.NET MVC 3 and jQuery
GridView - How to enable unobtrusive validation for inline edit form