-
Notifications
You must be signed in to change notification settings - Fork 10
List parameters
zhaber edited this page Jul 28, 2012
·
2 revisions
The rule engine supports the use of list parameters, which usually represent a check box group or a list of inputs with the same name. For example, in HTML you can specify the latter using the name[]
expression:
<input type="text" name="options[]" value=""/>
The syntax for list parameters does not differ from other parameters, so for instance, to set a validation constraint for the above field you can use the rule like this:
options isEvery(eq("confirm"))
In this case the eq
function is applied to each element of the options
list, and the rule fails if at least one member of the list does not pass validation (see also any
and collect
functions).