Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators?
For instance use a asp:RequiredFieldValidator leave the server side code alone but implement your own client notification using jQuery to highlight the field or background color for example.
Yes I have done so. I used Firebug to find out the Dot.Net JS functions and then hijacked the validator functions
The following will be applied to all validators and is purely client side. I use it to change the way the ASP.Net validation is displayed, not the way the validation is actually performed. It must be wrapped in a $(document).ready() to ensure that it overwrites the original ASP.net validation.
What you can do is hook into the validator and assign a new evaluate method, like this:
rfv is the ID of my required field validator. You have to do this at the bottom of your page so that it assigns it after the javascript for the validator is registered.
Its much easier just to use the CustomFieldValidator and assign its client side validation property.
Check out the documentation here and here.
The standard CustomValidator has a ClientValidationFunction property for that: