Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 23rd, 2008, 09:07 AM
Authorized User
 
Join Date: Dec 2007
Location: valsad, gujarat, India.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dharmeshtandel
Default Mobile number Validation

hi,

i have a one problem regarding the Mobile Number validation.
i want to prevent the Mobile number having the same sequence,
forexample : 0000000...,111111....,22222....,...,9999.... and 123456769

i have mobile number textbox with the maxlength is 15.
   so if anybody having the idea regarding the this kind of validation
then please give the right solution.


dharmeshtandel
__________________
dharmeshtandel
Reply With Quote
  #2 (permalink)  
Old April 23rd, 2008, 09:13 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Just a note on validation, be wary when limiting the input in fields. There is nothing worse than wanting to punch a number in in a format that you use, only to have the stupid app beeping at you.

For example, I sometimes enter numbers with spaces to make it easier to read back (such as credit card numbers). Not to mention international numbers and the extra digits required for them, and the fact some people enter the "+", while others do not.

In many instances you want to allow certain input (such as spaces, brackets and pluses) and validate ignoring them, rather than limiting the input at the UI level.

As for actually doing it, there are a number of ways, from char-to-char parsing (reading one in at a time and making sure it what is expected) to RegEx to simply cleaning it and hoping for the best! There are plenty of resources that google can reveal on this.

Rob
http://robzyc.spaces.live.com
Reply With Quote
  #3 (permalink)  
Old April 23rd, 2008, 01:12 PM
Imar's Avatar
Wrox Author
Points: 72,045, Level: 100
Points: 72,045, Level: 100 Points: 72,045, Level: 100 Points: 72,045, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,083
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Also be aware of "name calling". Some people can be reached by dialing 0800-Microsoft or 0900-Pizza for example.... ;)

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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
Getting mobile phone number yukijocelyn C# 2005 0 May 28th, 2008 11:43 PM
phone number validation debjanib ASP.NET 1.0 and 1.1 Professional 0 June 6th, 2006 12:01 PM
Number Validation ben805 Access VBA 0 December 5th, 2005 04:06 PM
Number validation jmss66 Classic ASP Basics 2 March 2nd, 2005 11:48 AM



All times are GMT -4. The time now is 08:32 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.