I have a CustomValidator that is validating a telephone number for several different telephone numbering schemes. The client-side javascript looks like this:
I think the problem is that there is no 'errormessage' property on the client side. The custom validator renders a tag to display the error message with an id corresponding the id property of the custom validator control. To set the text displayed when validation fails you need to do somthing like this.
...
case "North America":
args.IsValid = validateNAPhoneNumber(cleanNumber);
if (!args.IsValid)
document.getElementById(sender.id).innerText = "* Not a NA Phone #";
break;
...