Actions

QS

Preg validation: Difference between revisions

From LimeSurvey Manual

(Marked this version for translation)
Line 13: Line 13:


<!--T:5-->
<!--T:5-->
<div class="simplebox">Starting in version 1.92, if any question or sub-question value does not meet the validation requirements, the background color 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 and do not need to wait for the user to click submit in order to validate the question.</div>
If any question or sub-question value does not meet the validation requirements, the background color of the text entry field will be changed to red {{NewIn|1.92}} so that users can easily see which parts  of the question need to be corrected.  Thus, you can do on-page validation and do not need to wait for the user to click submit in order to validate the question.


<!--T:6-->
<!--T:6-->
Line 25: Line 25:
<!--T:8-->
<!--T:8-->
</onlyinclude>
</onlyinclude>
[[Category:Question Settings]][[Category:Advanced Question Settings]]


</translate>
</translate>

Revision as of 20:46, 12 June 2013


Validation (using regular expressions) (preg_validation)

Description

This option lets you specify a regular expression with which to validate all parts of a question.

If any question or sub-question value does not meet the validation requirements, the background color of the text entry field will be changed to red (New in 1.92 ) so that users can easily see which parts of the question need to be corrected. Thus, you can do on-page validation and do not need to wait for the user to click submit in order to validate the question.

Valid values

  • Any valid regular expression

Example

  • See multiple examples here