Actions

QS

Em validation sq/nl: Difference between revisions

From LimeSurvey Manual

(Created page with "===Subvraag validatie vergelijking (em_validation_sq)===")
No edit summary
 
(27 intermediate revisions by 3 users not shown)
Line 4: Line 4:
===Subvraag validatie vergelijking (em_validation_sq)===
===Subvraag validatie vergelijking (em_validation_sq)===


{{FeatureStarting|v=1.92}}
'''Beschrijving'''


'''Description'''
Deze vergelijking wordt gebruikt om elke subvraag afzonderlijk te valideren.  Als de invoer van een subvraag niet voldoet, dan wordt de achtergrondkleur roze (gebruik van de  em_sq_fn_validation CSS-style) om de fout te markeren.  Dit is een aanvulling op de normale reguliere expressie validatie.


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'''


'''Valid values'''
Elke vergelijking die de syntax gebruikt die beschreven is in de [[ExpressionScript - Presentation/nl|ExpressionScript]], zonder de omringende accolades.


Any equation, using [[Expression Manager|Expression Manager]] syntax, without surrounding curly braces.
'''Voorbeelden'''


'''Examples'''
Een voorbeeld, als je alleen getallen wilt toestaan die een veelvoud van 3 zijn, wordt de vergelijking:


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|Expression Manager]] called ''validateEmail()'' which uses DNS lookup service to validate the existence of the domain.
<syntaxhighlight lang="php">(this / 3) == floor(this/3)</syntaxhighlight>


As another example, say you only want to allow numbers that are a multiple of 3, the equation would be:
De gereserveerde variabele [[ExpressionScript - Presentation/nl#Gereserveerde variabelen ('this','self','that')|''this'']] wordt automatisch vervangen door een referentie naar het actieve invoerveld.
 
<syntaxhighlight lang="php" enclose="div">(this / 3) == floor(this/3)</syntaxhighlight>
 
The reserved variable ''this'' is automatically replaced by a reference to the active text entry cell.


</onlyinclude>
</onlyinclude>


[[Category:Question Settings]][[Category:Advanced Question Settings]]
[[Category:Question Settings/nl]][[Category:Question Logic Options]]

Latest revision as of 19:39, 9 March 2022


Subvraag validatie vergelijking (em_validation_sq)

Beschrijving

Deze vergelijking wordt gebruikt om elke subvraag afzonderlijk te valideren. Als de invoer van een subvraag niet voldoet, dan wordt de achtergrondkleur roze (gebruik van de em_sq_fn_validation CSS-style) om de fout te markeren. Dit is een aanvulling op de normale reguliere expressie validatie.

Geldige waarden

Elke vergelijking die de syntax gebruikt die beschreven is in de ExpressionScript, zonder de omringende accolades.

Voorbeelden

Een voorbeeld, als je alleen getallen wilt toestaan die een veelvoud van 3 zijn, wordt de vergelijking:

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

De gereserveerde variabele this wordt automatisch vervangen door een referentie naar het actieve invoerveld.