/ Published in: C#
A very liberal validation of phone number. Assures there are at least 10 digits in there somewhere.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
protected void ValidPhone(object source, ServerValidateEventArgs e) { MatchCollection m = Regex.Matches(e.Value, "[0-9]"); e.IsValid = (m.Count > 9); }