Mirna
Mirna

Reputation: 3

ASP.Net Validation Expressions for Phone Numbers

I need a Validation Expression to validate an Egyptian mobile number as an input in my form.

Egyptian Mobile Number:

Upvotes: 0

Views: 3365

Answers (1)

Dmitry Bogomolov
Dmitry Bogomolov

Reputation: 426

Do you need to support starting '+' characters, spaces or '-' signs inside your phone number? If you don't and you need to support just exact what you said then you can use this pattern:

"^01[0-2][0-9]{8}$"

Upvotes: 2

Related Questions