You may want to include validation on required fields. This will ensure that when user are interacting with the form they are providing the correct information and also this will cut down on invalid submissions.
...
Screen readers will announce "Error" and then any instructions you include in the Error Msg. Upon encounter the field a screen reader will announce "Invalid" and then the contents of the field.
See also Error Action
Additional Documentation by Frevvo
...
- Text
- Money
- Phone
- Quantity
- Number
Example: Email Address Validation
...
- While sitting on the field, "Email Address, Star, Edit Required."
- Upon leaving the Field, "Alert, Must be valid email address."
- Upon encountering their invalid entry,"Invalid entry", and then the text will be read that is in the input.
- Create a text field and give it a Label of Email Address
- In the properties menu on the left fill in the following areas:
Pattern
Code Block [a-zA-Z0-9\-_][a-zA-Z0-9\-\+_]*(\.[a-zA-Z0-9\-\+_]+)*@([a-zA-Z0-9\-_]+\.)+[a-zA-Z]{2,6}
- Error Message
- Required - Checkbox
- Save your form and test it
...
All the Validation Patterns are XML schema regular expressions (regex) created. you can use an a tool like regex101 to create your own patterns or use any of the following.
The following examples were found on frevvo's documetation site linked at the top of this page.
US Zip Code Pattern
A pattern that restricts a text control to only allow strings formatted as a US zip code: ##### or #####-####:
Code Block |
---|
\d{5}|\d{5}-\d{4} |
The form will flag an error unless the value entered is either five digits or five digits followed by the '-' character followed by 4 digits.
US/Canada Zip/Postal Code Pattern
This pattern validates US zip codes (##### or #####-####) and Canadian postal codes (L#L #L#).
Code Block |
---|
>(\d{5}(-\d{4}))|(\d{5})|([ABCEGHJKLMNPRSTVXY]{1}\d{1}[A-Z]{1} *\d{1}[A-Z]{1}\d{1}) |
SSN
This pattern ensures that the user enters a valid Social Security Number:
Code Block |
---|
\d{3}-\d{2}-\d{4} |
Numbers with commas
Live Forms' default The default number control supports digits followed by an optional decimal point and multiple decimal places. Suppose instead you want to allow numbers containing commas and optionally starting with a '$' and only up to 2 decimal places. For example: $1,000.50 2,500. But also to allow numbers without the comma such as $1000. To do this:
Add a text control to your form
Set the pattern to:
Code Block \$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\.[0-9][0-9])?
If you do not want to allow the optional '$' then:
Set the pattern to:
Code Block ([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\.[0-9][0-9])?
Phone pattern
A pattern such as ##-####-#### or ####-###-### is not a simple restriction. To impose validation against this pattern you must start with a Text control rather than a Phone control
Code Block |
---|
\d{2}-\d{4}-\d{4} or \d{4}-\d{3}-\d{3} |
...