Validate answers with a regular expression
You can define a question that accepts an answer which is validated using a regular expression that you define. If the user enters a value in an unexpected format, you can send them an error message giving feedback on what they need to enter. You can use this as an alternative to the predefined answer types in EngageOne™ Communicate Chat.
Note: Define this answer format on the Answers tab of the Question interaction.
Answer format | Select the answer format: Set up Regular Expression Answer. |
Validation expression | Enter the regular expression that will validate that the answer is in the expected format. You can use any regular expression provided that it is well-formed. You can learn more about using regular expressions from third-party websites. For example: https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference. |
Validation error message | If the user enters an answer that is not in the expected format, this error message is sent to them. |