Setting a Regular Expression
You can provide a regular expression for an existing column. Validation expression must begin and end with a forward slash (/). The following tables lists some examples of validation regular expressions:
Condition for Data Validation | Validation Expression |
It must have at least 1 digit. | /[0-9]{1,}/ |
It must be exactly 6 characters long. | /^.{6}$/ |
It must follow the SS# format. | /^[0-9]{3}-[0-9]{2}-[0-9]{4}$/ |
It must begin with an uppercase. | /^[A-Z]$/ |
It must be numeric, in the format xxx-xxx-xxxx | /^[0-9]{3}-[0-9]{3}-[0-9]{4}$/ |
To set a regular expression
1. On the Menu toolbar, click Define > Objects and navigate to the required object.
2. Click the Structure tab.
3. Click the Edit icon of the column of which you want to validate data.
4. In Validation Regular Expression, enter the regular expression for validation.
5. In Regular Expression Error Message, enter the message to display when there is a violation error.
6. Click Save.