Loading...
Loading...
Loading...
The Input component prompts the agent for text input and can validate the text. You can bind the value of a text input component to a variable.
Select allows you to choose a preset validation pattern. The validation presets are:
| Input must conform to email address syntax. | |
| Alphabetic | Allow alphabetic input only (no numbers). |
| Alphabetic – With Spaces | Allow alphabetic input only and require spaces between words. For example, “cool beans” is acceptable but “cool_beans” is not. |
| Alphabetic – with Underscores | Require alphabetic input only (no numbers) and underscores between words. For example, “cool_beans” is acceptable but “cool beans” is not. |
| Alphanumeric | Text input must contain both letters and numbers. |
| Alphanumeric – With Spaces | Text input must contain both letters and numbers with words separated by spaces. |
| Alphanumeric – With Underscores | Text input must contain both letters and numbers with words separated by underscores. |
If a prepackaged validation is not sufficient, you can use a regular expression to validate text input. Select Custom from the Validation list. Then, enter a regular expression in the text box. Regular expressions are beyond the scope of this topic. But, suppose for example, that you want the user to enter the phrase “dog” somewhere within a text input. Typing dog in the custom validation property sets up a simple regular expression that accepts dog, sundog, hotdog, my good dog Penny, or other combinations of characters that contain that case-sensitive string, but not DOG Doggie, and so on.
Another example is ^[a-z]+$ to accept lowercase alphabetic characters only.
When focus leaves the text box, the value of the text input component is validated to ensure that it conforms with the selected validation rule. If user input does not pass validation, borders turn red to indicate a validation problem. You can test custom and prepackaged validations in the editor’s preview mode.
Optionally, set other properties of this component. For example, you can adjust the spacing around this component using margin settings.
Get user feedback about articles.