10 digit phone number validation - validation

I'm using cform to capture internet leads on my website. I need a code so that people have to provide full 10 digit phone number or else it wont let them submit the request. Thank you.

Just get the length of what the user provides. check if they are all numbers, and if they are, assume that it is a number.

Related

Payment card validation with issue number and start date

I'm aware of the Luhn algorithm for validation of payment card numbers.
However, is there something similar that will tell me whether a particular card requires a start date or issue number, as these aren't universal?
Using this information, I would then show or hide the start date and/or issue number input boxes once a customer has entered their payment card number.
As far as I know, no there is no way to detect whether the expiry date (I assume that's what you meant by start date) is required based on the card number.
In these kind of situations (i.e. special cases for different cards), I've turned to this site as well as the backing data. With this data, you can get the bin of a credit card from the first 6-8 digits. I'm skeptical as to whether even the bin contains the data you are looking for, but good luck!
Just a note: be wary of the data since it is open source. In my experience it has been accurate, but make sure you keep that in mind. There are enterprise solutions to get bin data if accuracy is that important to you.

Sage Pay 4021 Error

I am getting "INVALID. 4021 : The Card Range not supported by the system." in magento website while transaction. Please let me know how can I resolve this
The explanation is that Sage Pay do not recognise the BIN range for that particular card (identified by the first 9 or so digits of the PAN). This maybe because the number was input incorrectly, the BIN range is no longer valid (eg: card withdrawn), or the range is so new that Sage Pay haven't received and applied the updated ranges yet.
It looks like you need to unblock the card range. You can do this by clicking the “trashcan/rubbish bin” to the right of the card range. Once you have clicked the “trashcan/rubbish bin” you will simply be asked to confirm you would like to remove the card range from your blocked list.
Once you have confirmed you would like to remove this card range it will no longer appear in your blocked list and you can process transactions using this range.
If this does not fix it, check this out for more detail.

Windows Phone 7 - passing values between pages

I saw some previous post about this but i still don't understand. I have Three pages and i need to add all the user input IE car1, car2 , car3, and on the third page display a message of the totals. I would greatly appreciate any assistance. So to Recap i would need to add both values from the input on the two pages and display the total on the third.
The only way out it seems is using IsolatedStorage to store those values in the textboxes. Since there is not a huge amount of data you need to store, you can have a look at that. You can read up about it over here and about its usage over here

How do I query a Windows Phone 7 phone number via API?

Quick question that I can't find an answer to...
How do you find what the number of the phone running Windows Phone 7 is?
For example, in the UK the number would start with 447*. I need this information to send to our server so it can send the user a text message when something has happened.
As far as I know, phone number is not available via the API.
Do you mean the phone's actual number or the country code? +44 is the UK international code. If you mean the phone number, I don't think this is possible. In Mango, you can get the Mobile Operator. Mobile operators tend to have their own first few digits, so you could store a table of those and check it against the operator returned. It may not be wholly accurate, but might be useful if you can get a list of numbers of prefix major operators.
It is not available with the API, nor any private methods.
This is also not in the Mango release as far as I am aware.
Its not available directly; but if you definitely need the phone number and you are providing a useful service that the user is interested in, then just ask the user to provide their phone number.
You can validate if the user has entered the number along with country code by looking at the location and determining the country code from a lookup table/ web service.

How do you store cell phone numbers in a database?

With the age of text messages and things like that, what's a good way to store phone numbers in a database?
In the USA, text messages are handled by phone numbers but in other countries I hear they use email addresses so I guess there needs to be a way to differentiate between countries that use cell phone numbers as their address.
Addition:
For example, people in the USA might use 432-342-3333 or 1-432-342-3333 while in the UK they might use +44 800 400000 or they might even leave out the 44. The 44 and the 1 makes a difference when automatically sending out SMS. However, checking the phone number for each country can get tedious. In this case, would you split the country code or would you merge it into a single column and deal it with it there?
I would primarily use a text field, or a series of text fields, even if you are using a numerical phone number for the following reasons.
Phone numbers have a great range of values, including extension numbers which may result in numerical columns losing precision.
Losing precision in a phone number is rather bad.
There is no logical reason to want to perform math ( addition/multiplication ) on a phone number.
Additionally, you may want to specify how you are using this data. If you are planning an automated messaging service, you're going to need a series of relaying agents to broadcast via, so you may as well add an identifier that pertains to the relay the information pertains to. Then all you have to worry about is that the relaying agent can understand the content in the text fields.
Generally as text, you don't need all the fancy formatting, unless you need it to parse numbers from different countries that you can't distinguish otherwise. You can always add the formatting later on.
Not as a number!!! Leading zeros may be problematic.
I don't know if you have read these two questions, but they might help you a little.
Phone Number Columns in a Database
Is there a standard for storing normalized phone numbers in a database?
Perhaps it would be wise to store the type of number (landline, cell, fax) and/or the messages that can be received on it (voice, text, email). Note that in the US, it is also possible to send text messages to a phone via email, but I believe that is dependent on the carrier.

Resources