Preg validation/en: Difference between revisions
From LimeSurvey Manual
(Importing a new version from external source) |
(Updating to match new version of source page) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages /> | <languages /> | ||
<onlyinclude> | <onlyinclude> | ||
===Validation (using regular expressions) (preg_validation)=== | ===Validation (using regular expressions) (preg_validation)=== | ||
'''Description''' | '''Description''' | ||
This option lets you specify a regular expression with which | This option lets you specify [[Using_regular_expressions|a regular expression]] with which you can validate all the parts of a question. | ||
If any question or | If any question or subquestion value does not meet the validation requirements, the background colour of the text entry field will be changed to red so that users can easily see which parts of the question need to be corrected. Thus, you can do on-page validation. In this way you will '''not''' need to wait for the user to click on the submit button to validate the respective question. | ||
'''Valid values''' | '''Valid values''' | ||
Line 14: | Line 14: | ||
'''Example''' | '''Example''' | ||
* | *[[Using regular expressions|Click here]] to check multiple examples. | ||
</onlyinclude> | </onlyinclude> | ||
[[Category:Question Settings]][[Category: | [[Category:Question Settings]][[Category:General Question Options]] |
Latest revision as of 17:15, 23 August 2018
Validation (using regular expressions) (preg_validation)
Description
This option lets you specify a regular expression with which you can validate all the parts of a question.
If any question or subquestion value does not meet the validation requirements, the background colour of the text entry field will be changed to red so that users can easily see which parts of the question need to be corrected. Thus, you can do on-page validation. In this way you will not need to wait for the user to click on the submit button to validate the respective question.
Valid values
- Any valid regular expression
Example
- Click here to check multiple examples.