Actions

QS

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...")
 
(Marked this version for translation)
Line 4: Line 4:
<onlyinclude>
<onlyinclude>


===Validation (using regular expressions) (preg_validation)===
===Validation (using regular expressions) (preg_validation)=== <!--T:2-->


<!--T:3-->
'''Description'''
'''Description'''


<!--T:4-->
This option lets you specify a regular expression with which to validate all parts of a question.
This option lets you specify a regular expression with which to validate all parts of a question.


<!--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>
<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>


<!--T:6-->
'''Valid values'''
'''Valid values'''
*Any valid regular expression
*Any valid regular expression


<!--T:7-->
'''Example'''
'''Example'''
*See multiple examples [[Using regular expressions|here]]
*See multiple examples [[Using regular expressions|here]]


<!--T:8-->
</onlyinclude>
</onlyinclude>


</translate>
</translate>

Revision as of 23:54, 5 May 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.

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.

Valid values

  • Any valid regular expression

Example

  • See multiple examples here