|
Subject:
|
Mobile number Validation
|
|
Posted By:
|
dharmeshtandel
|
Post Date:
|
4/23/2008 9:07:14 AM
|
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
|
|
Reply By:
|
robzyc
|
Reply Date:
|
4/23/2008 9:13:56 AM
|
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 By:
|
Imar
|
Reply Date:
|
4/23/2008 1:12:01 PM
|
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.
|