Hi,
I have written some server side validation. A parameter is passed through and based on what this parameter is, the IsValid method returns a regular expression. All is working ok server side, but I would like to add client side validation to this.
I know I need to write two JavaScript methods (i.e. $.validator.unobtrusive.adapters.add() and  $.validator.addMethod()) however, I don't know how to apply it. Please can someone help me? This is very important I get this working and any help would be much much appreciated. I have tried so many things and I just cant seem to get my head around it as I'm a newby.
It's very important that the value is passed in so that it returns the correct regular expression.
The following is my code... Thank you very much
protected override ValidationResult IsValid(object value, ValidationContext validationContext) { var TypeValue = valid ...

Go to the complete details ...