Invalid characters

Hi Belinda -

There are a couple of ways to set up validation in order to only allow numbers to be entered. A number field 'allows' non-digit characters to be entered, but converts them to 0s upon submit.

1. Number field type. If your set up requires additional 'number' functionality such as being used in an equation, you can use a Validation Rule set up in the following manner: "When" "Number" "is lower than" ".5."

Then, if letters are entered into the form field, (like asdf), Knack will attempt to convert this to a 0. Since 0 is lower than .5, it returns the error message.

2. Short Text field type. If you do not need additional 'number' functionality such as being used in an question, you can use a Short Text field outfitted with a Validation Rule with a simple regular expression of \d to allow only numbers.

Note that at this time Number fields do not allow regular expressions to be used, so this setup requires a Short Text field type.



Let me know if that doesn't work for you!