Actions

QS

Em validation q/nl: Difference between revisions

From LimeSurvey Manual

(Created page with "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 C...")
Line 8: Line 8:
'''Beschrijving'''
'''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 then em_validation_q_tip message has the CSS style .error set to it.  This tip uses the .em_q_fn_validation CSS style, which is hidden by default within template.css.
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 is standaard verborgen (hidden), zie template.css.


The main difference between this feature and the Sub-question 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 sub-question validation, each text entry cell (e.g. in array, but also applies to single entry question types) will be styled so that the background color is pink.
The main difference between this feature and the Sub-question 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 sub-question validation, each text entry cell (e.g. in array, but also applies to single entry question types) will be styled so that the background color is pink.

Revision as of 15:53, 26 August 2013


Vraag validatie vergelijking (em_validation_q)

 Tip: De functie is beschikbaar vanaf versie 1.92


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 is standaard verborgen (hidden), zie template.css.

The main difference between this feature and the Sub-question 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 sub-question validation, each text entry cell (e.g. in array, but also applies to single entry question types) will be styled so that the background color is pink.

Geldige waarden

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

Voorbeeld

    • Je wilt demografische informatie verzamelen van gebruikers met een meerdere korte tekst vraag, en je wilt valideren dat de gebruiker een goed e-mailadres en telefoonnummer invult.

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 validate the accuracy of your expression and ensure there are no syntax errors:

As you can see, the validation equation tests that both the email and phone are either empty or match a regular expression filter.

The validation tip only shows the warning message if the phone or email appears invalid.

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