tags:

views:

67

answers:

1

I am validating a Phone Number textbox. I would like to first strip the unneccessary characters from the value entered then validate that the number of characters is not more or less than 11. I know how I would do this in C# code. Unfortunately I now need to do this in an XML document. Validating the length of the corrected data is not a problem.

+3  A: 

Use RegEx.Replace against the phone number after pulling the value of the phone number from the value of the attribute or element that contains it. Then put the edited value back.

John Saunders