Wrox Programmer Forums
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2012, 11:02 AM
Authorized User
 
Join Date: Jun 2010
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mobile Number Validations

Hi,
I have textbox for Mobile number. I would like to put validations through regual expression.
There are three condiotions for valid mobile number
1) It must have numberic character only like 1,2,3----9
2)It must be of 10 digits like 9835198351,9234302220
3) It must start with 7 or 8 or 9.
example of valid mobile numbers
9835198351,
9234302220
7435162533
7000000000
9999999999
8835127139

Ivalid Phone nubers

6835198351,
5234302220
3435162533
2000000000
1999999999
4835127139


I have searched a regular expression for this ^[0-9]{10}
But it fulfulling first both condition but it do not validates
3rd condition.

Please reply soon.
 
Old September 3rd, 2012, 07:52 AM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

did not check but hope it may work. try this
^[7-8-9][0-9]{9}
 
Old January 4th, 2013, 12:35 PM
ambes01
Guest
 
Posts: n/a
Default

No Comments..........







Broomfield residential painting

Aurora House Painter
Received Infraction
 
Old January 21st, 2013, 02:04 PM
nlouis1
Guest
 
Posts: n/a
Default

Validating mobile phone numbers in international format isn't all that easy. Numbering plans are disparate and constantly changing.









Flight Simulator Sydney

Sydney Flight Simulator





Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation For Phone Number and Mobile Number dhruthi.ram99 Javascript How-To 12 October 30th, 2011 07:24 AM
In search of a Mobile Phone/ Mobile network carrier Programmer Godfrey Perl 0 July 26th, 2011 11:43 PM
how to send sms from my asp.net web application to any mobile number in india. ashsahji123 ASP.NET 3.5 Basics 0 May 28th, 2010 07:42 AM
Getting mobile phone number yukijocelyn C# 2005 0 May 28th, 2008 11:43 PM
Mobile number Validation dharmeshtandel C# 2 April 23rd, 2008 01:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.