Return to Snippet

Revision: 31554
at September 8, 2010 23:39 by housecor


Initial Code
protected void ValidPhone(object source, ServerValidateEventArgs e)
		{
			MatchCollection m = Regex.Matches(e.Value, "[0-9]");
			e.IsValid = (m.Count > 9);
		}

Initial URL

                                

Initial Description
A very liberal validation of phone number. Assures there are at least 10 digits in there somewhere.

Initial Title
Validate phone liberally

Initial Tags
regex, phone, validation

Initial Language
C#