Actions

QS

QS:Em validation q

From LimeSurvey Manual

Revision as of 14:05, 21 April 2018 by FuzzyBot (talk | contribs) (Updating to match new version of source page)


Vraag validatie vergelijking (em_validation_q)

Beschrijving

This is an equation that is used to validate the entire question (e.g, all of its parts collectively for a multi-answer question). If the question fails the validation criteria, then em_validation_q_tip message will be displayed (it uses the CSS style .error). This tip uses the .em_q_fn_validation CSS style, which is hidden by default within 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)!