Actions

QS

Difference between revisions of "Em validation sq/nl"

From LimeSurvey Manual

(Created page with "'''Geldige waarden'''")
(Created page with "De vergelijking gebruikt de syntax die beschreven is in de Expressie Beheer, zonder de omringende accolades.")
Line 12: Line 12:
 
'''Geldige waarden'''
 
'''Geldige waarden'''
  
Any equation, using [[Expression Manager|Expression Manager]] syntax, without surrounding curly braces.
+
De vergelijking gebruikt de syntax die beschreven is in de [[Expression Manager/nl|Expressie Beheer]], zonder de omringende accolades.
  
 
'''Examples'''
 
'''Examples'''

Revision as of 15:23, 26 August 2013

Other languages:
English • ‎Nederlands • ‎français • ‎日本語


Subvraag validatie vergelijking (em_validation_sq)

Notice.png
 Tip: De functie is beschikbaar vanaf versie 1.92


Beschrijving

This is an equation that is used to validate each sub-question (text field) individually. Any text field that does not pass these validation conditions will have its background color turned pink (using the .em_sq_fn_validation CSS style) to highlight the error. Note that this is available in addition to the regular expression-based validation option.

Geldige waarden

De vergelijking gebruikt de syntax die beschreven is in de Expressie Beheer, zonder de omringende accolades.

Examples

Say you have a multiple short text question and you want to collect email addresses. You could use the regular expression validator to make sure the email address has proper syntax, but that doesn't guarantee that the domain name exists. You could add a function to Expression Manager called validateEmail() which uses DNS lookup service to validate the existence of the domain.

As another example, say you only want to allow numbers that are a multiple of 3, the equation would be:

(this / 3) == floor(this/3)

The reserved variable this is automatically replaced by a reference to the active text entry cell.