Actions

QS

QS:Em validation q

From LimeSurvey Manual

Revision as of 10:15, 23 April 2018 by Han (talk | contribs)


Vraag validatie vergelijking (em_validation_q)

Beschrijving

Deze vergelijking wordt gebruikt om de hele vraag te valideren. Als de invoer van een vraag niet voldoet, dan wordt de em_validation_q_tip getoond met de em_q_fn_validation CSS-style om de fout te markeren. Deze tip is standaard verborgen (hidden) in het template.css.

The main difference between this feature and the subquestion validation equations (em_validation_sq option) is that for this feature, if the question (or question parts) fail validation, then an error message could be shown. For the subquestion validation, each text entry cell (e.g., in an array question type, but it can also be applied to single entry question types) will be styled so that the background color is (light) red.

Geldige waarden

  • Een vergelijking, die de Expressie Beheer syntax gebruikt, zonder de omringende accolades.

Voorbeeld

  • You want to collect demographic information from users via a multiple short text question, and you want to validate that the user has entered a valid email address and phone number.

Voorbeeld met ongeldige gegevens:

Voorbeeld met geldige gegevens:

Hoe moet je de vraag wijzigen om de informatie in te voeren:

And here is part of the Show Logic File output that lets you check the accuracy of your expression and ensure that there are no syntax errors:

Zoals je kunt zien controleert de validatie vergelijking dat zowel het e-mailadres als het telefoonnummer of leeg zijn of voldoen aan een reguliere expressie filter.

De validatie tip is de tekst die getoond moet worden als het telefoonnummer of het e-mailadres ongeldig zijn.

 Hint: Als je meer complexe validatie-teksten wilt maken, lees dan Expressie Beheer.


If you wish to import the example from above into your LimeSurvey installation, download the following .lsq file: Em_validation_q_example.zip.

 Tip: LET OP, LimeSuvey gebruikt de Perl-syntax voor reguliere expressies, ze moeten dus beginnen en eindigen met een / (slash)!