I have a question on a form that the only answer would be a single number, or a list of numbers. "1" or "1,3,4,17,26", etc. Is it possible to not allow alpha characters in the field. I'm trying to prevent an answer such as "all lines", when the answer should be 1-10 or 1,2,3,4,5,6,7,8,9,10.
Cognito-forms – limit a text field in Cognito Forms to NOT allow alpha characters
cognito-formsdata validation
Related Topic
- Cognito-forms – How to send confirmation emails to multiple respondent addresses when entries are submitted in Cognito Forms
- Cognito-forms – Missing fields in Basic/Advanced Editor
- Cognito Forms – Remove Commas from Number Field
- Cognito-forms – Mathematics and decimal places
- Cognito-forms – Allowing field entry only once in Cognito Forms (discount codes)
- Cognito-forms – Limit choice field selections in Cognito Forms
- Cognito-forms – Number field limitation
- Cognito-forms – How to get an incremented date range using a table field in Cognito Forms
Best Answer
We will be releasing support for custom text format validation in Cognito Forms next week. You can track the release of this feature on our Idea Board. This will allow you to simply select a predefined format, like Numeric, enter simple masks, or even use custom regular expressions!
In the meantime, you can set up a Custom Error message on your Text field to display an error when a user enters in an alpha character. You can use the following calculation to do this, you will just need to change 'TextField' to reflect your own field's label.