In a Cognito Form, the phone field seems to accept letters as well as digits. I have used the number field and set it to integer but it still takes values like "9,890,099". How can I set it to only allow or accept numbers?
Cognito-forms – Allow only numbers in Cognito Form phone field
cognito-forms
Related Topic
- Cognito-forms – Extract numbers from a Cognito Form text field
- Cognito-forms – How to reference a field on a different section of a Cognito form
- Cognito-forms – Limiting by date field availability on Cognito Form
- Cognito-forms – Using Entry.Number in a calculation
- Cognito-forms – limit a text field in Cognito Forms to NOT allow alpha characters
- Cognito-forms – Validate text field to hold only digits
- Cognito-forms – Number field limitation
Best Answer
I am a developer for Cognito Forms.
When using a phone field set to the US, your phone number will look like a line of numbers until you click out of the field.
Then field will then auto verify that all characters are numbers and that 10 characters have been added.
If you have fewer then 10 characters or have a non-numeric character you will receive an error message. This will only happen when the field is set to "US".
For phone fields set to international we do not have validation. This is because of the wide variation between phone numbers in difference countries. We are considering ways to incorporate validation for this, like using Google's phone number library.