Page summary
Fare type validation
The fare type validation feature provides an added element of security to the use of a particular fare type by enabling a field where the customer is required to input a particular expression in order to be able to purchase that fare type. This expression could be a a student identification number, for example.
To configure a fare type validation, navegate to Operations -> Fare Type and sekect +Add New/edit an existing fare type. Once on the Edit Fare Type screen, select the Requires extra use info checkbox.
Requires extra user info
Field label - The text that will appear as the field’s label (e.g., "Student Number").
Field hint - A helpful message for users (e.g., "It’s on the back of your student card!").
Field validation - Regular expression used to validate input. Use Regex conventionsto build and test it. Example: ^STGEO[0-9]{2}[a-z]{3}$.
Valid example - A sample value that matches the regex (e.g., STGEO02ody).
Optional Settings
Save extra user input - If you check this box, the system will automatically save the information entered in the Validation box. You can access this information later through the Tickets Report, in the Extra Field, as shown below.
Extra user input mask - To protect your customer's information, you can set a mask that will hide certain characters from the user input. The rules for this have to be following the Regex conventions as well.
This is how your configuration will appear in the UI:
Regex Example Breakdown
Here is a short example of Regex conventions:
Consider:
- ^STGEO[0-9]{2}[a-z]{3}$|^STSAN[0-9]{2}[a-z]
- ^ is a constant in the expression
- ^STGEO is a constant expressions
- [0-9] a number between 0 to 9
- [0-9]{2} any 2 numbers between 0-9
- [a-z] a letter from a-z
- [a-z]{3} any 3 letters between a-z
- $ close the sequence
- | and/or
Final Steps
- Verify all fields are correct.
- Click Save to persist the configuration.
Your fare type is now protected: every purchase will prompt for the required value, which will be validated automatically.