I have a CustomValidator that is validating a telephone number for several different telephone numbering schemes. The client-side javascript looks like this:
Try this...
Use sender.textContext in the Javascript for the error message and setup your CustomValidator as such: