- Next to Validation Type, click
Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
|
- A validation type can also be selected from the drop-down, if the desired validation exists, or edited by clicking the Validation Type hyperlink
- The Validation Type properties open, see Validation Type
- Enter:
- Name, this should be indicative of its purpose. For example, minimum name length
- Base Type, select the type of data. For example, different data types have different parameters such as numbers specifying the maximum value
- Minimum Length (optional), sets the minimum number of characters. For example, 2
- Maximum Length (optional), sets the maximum of characters. For example, 150. If left blank there is no maximum
- Error Message (optional), enter a custom message or leave blank for the default message. This is shown when the field fails the validation check and you mouseover the field
- your changes
- If you are using the Serene Grey Template, the form fields that fail validation will have a red outline after changing the value or when a form is loaded with data in it, such as an edit form
Image Added
- Right-click on the form field you would like to set a pattern match for and choose
Insert excerpt |
---|
| _set_validation |
---|
| _set_validation |
---|
nopanel | true |
---|
| - The properties will open on the right, scroll down to the Validation section
- Click on the tickbox next to Validation Type
- Next to Validation Type, click
Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
|
- A validation type can also be selected from the drop-down if the desired validation exists or edited by clicking the Validation Type hyperlink
- The Validation Type properties open, see Validation Type
- Enter:
- Name, this should be indicative of its purpose. For example, minimum name length
- Base Type, select
String - Pattern, define a pattern the input must adhere to in the form of a regular expression. Pattern examples are provided at the end of this section
- your changes
- If you are using the Serene Grey Template, the form fields that fail validation will have a red outline after changing the value or when a form is loaded with data in it, such as an edit form
Image Added
Example PatternsSee Regular Expressions for details on how to create a pattern. Description | Pattern |
---|
Alpha Only | [A-Za-z] | Alpha Numeric including, hyphens, underscores, spaces, ampersands and full stops | [A-Za-z0-9\s\-_.)(\/\-\&]
| Numeric Only | [0-9] | Email | ^[a-zA-Z0-9!#$%&'*+/=?^_‘{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_‘{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
| Specific words e.g. hello or world | \b(hello|world)\b |
|