Em validation q/nl: Difference between revisions
From LimeSurvey Manual
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
'''Beschrijving''' | '''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 ([[QS:Em_validation_sq|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 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 subquestion validation equations ([[QS:Em_validation_sq|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 array, but also applies to single entry question types) will be styled so that the background color is pink. |
Revision as of 11:21, 3 April 2018
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 array, but also applies to single entry question types) will be styled so that the background color is pink.
Geldige waarden
- Any equation that makes use of the Expression Manager syntax, without surrounding curly braces.
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 reasonable email 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 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 number are either empty or match a regular expression filter.
De validatie tip is de tekst die getoond moet worden als het telefoonnummer of het e-mailadres ongeldig zijn.
If you wish import the example from above into your LimeSurvey installation, download the following .lsq file: File:Em validation q example.zip