Preg validation: Difference between revisions
From LimeSurvey Manual
(Created page with "<translate> <!--T:1--> <languages /> <onlyinclude> ===Validation (using regular expressions) (preg_validation)=== '''Description''' This option lets you specify a regular e...") |
mNo edit summary |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
<!--T:1--> | <!--T:1--> | ||
<languages /> | <languages /> | ||
<onlyinclude> | <onlyinclude> | ||
===Validation (using regular expressions) (preg_validation)=== <!--T:2--> | |||
<!--T:3--> | |||
'''Description''' | '''Description''' | ||
This option lets you specify a regular expression with which | <!--T:4--> | ||
This option lets you specify [[Using_regular_expressions|a regular expression]] with which you can validate all the parts of a question. | |||
< | <!--T:5--> | ||
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. | |||
<!--T:6--> | |||
'''Valid values''' | '''Valid values''' | ||
*Any valid regular expression | *Any valid regular expression | ||
<!--T:7--> | |||
'''Example''' | '''Example''' | ||
* | *[[Using regular expressions|Click here]] to check multiple examples. | ||
<!--T:8--> | |||
</onlyinclude> | </onlyinclude> | ||
<!--T:9--> | |||
[[Category:Question Settings]][[Category:General Question Options]] | |||
</translate> | </translate> |
Latest revision as of 18:23, 20 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.