Administrators' overview > Creating booking code validation rules Creating booking code validation rules |
When setting up a Text-based booking code, administrators have the option of ticking the Validate checkbox in the group setup screen; when ticked, the system attempts to validate the booking codes that a user types into the Booking screen by applying validation rules.
It is easiest to create validation rules for booking codes that are predictable and consistent in format and structure. For example, if using departmental codes, use a standard list of codes which are known and implemented throughout the business.
Before you start
1. | Design the validation rules for Text-based booking codes by going through the following steps: |
a) | Define whether or not it is essential for the user to type some input. |
Does it matter whether the user types some characters or leaves the field blank? If it does not matter, the system's validation rule has to be flexible enough to cope with either.
b) | Define the content of the booking code. |
Does the code contain both letters and digits? If a particular number of characters is required, and if they have to be in predictable combination and/or case, the rule can be set up to validate the user's input.
c) | Define how many characters the booking code has to contain. |
If the length of the booking code is fixed, the rule has to check the length of the user input string. Note that the Reference and Department fields in the Booking screen have a limit of 12 and 30 characters respectively.
d) | Define the case of letters. |
Does the booking code have to contain upper or lower case letters or a mixture in a particular combination? If case is important, the rule has to distinguish between upper and lower case in the user input string.
e) | Define whether there are other mandatory characters. The system only validates / (forward slash) and space. |
2. | Define a validation rule that meets all your business requirements and document it. In order for SameDay online to interpret a validation rule correctly, it MUST be input into the system using specific characters - refer to the table in Validation Rules |
3. | In order to add the booking code validation rules you must either be in the screen Adding a New Admin Group or User Group and Viewing/Amending an Admin Group or User Group. Then go to the Booking Code panel. |
Actions
1. | Go the Booking Codes panel. |
2. | Go to the relevant row and select Text from the Field Type dropdown list. |
As booking codes are specific to an account, any group with access to the selected account uses the same booking codes. When a booking code is modified, the latest modification is applied to all groups that use the account. |
3. | Click Validation Rules. |
4. | Type the rule you defined earlier and click Save. |
5. | Tick Show HelpText and then click Edit HelpText. |
It is highly recommended that you edit the HelpText to provide the booker with clear guidance on what they are expected to type into a Text-based booking field. This is especially important if the booking codes have been customised for your business.
6. | Go to the next booking code field and repeat these steps if it is also a Text-based field. |
If the other booking code is going to be a dropdown List, follow the instructions in Creating a list of booking codes.
7. | When you have completed all the changes to the Booking Code panel, continue Adding a New Admin Group or User Group or Viewing/Amending an Admin Group or User Group. |
Related topics