The Input Validation feature controls what values the user can enter into the different questions of the Survey Widget.
The text in the respondents’ answers can be checked to ensure that they meet certain criteria, such as ensuring that phone numbers follow a specific format. To check an answer, a regular expression will be used, which searches for and matches patterns in the text.
For an introduction to Regular Expressions, see the following W3Schools reference: http://www.w3schools.com/jsref/jsref_obj_regexp.asp.
To check the text in the survey’s answers, in addition to the information required to create a survey with simple questions, a Restriction column must be created in the Survey table, at the question level.
For survey answers that are text fields or text areas, the Restriction object defines the expected format of the answer. Some examples of regular expressions are as follows:
At runtime, if the Current Answer of this specific question matches the regular expression specified under Restriction, the input validation passes, otherwise, a specific error message will show up. So far the input validation only applies to question type text field/text area.
In order to take advantage of this new functionality, follow the steps below:


Refer to the Strategy Dashboards and Widgets Creation guide for further instructions about creating Survey Widgets.
The Strategy Internal Reference Number for the feature described in this technical note is 952467.