I have an ASP .NET page with ASP validators (Required Field, Regular Expression,...) plus java script functions for additional validation (for example, to check if second date b
When using a CustomValidator, the client side validation function needs to accept a source and an arguments parameter. Then, to mark the validation as failed, you set arguments.IsValid
to false. Here is the MSDN page for the CustomValidator.
function validate(source, arguments) {
// ...
alert('Not valid!');
arguments.IsValid=false;
}