Skip to content
zhaber edited this page Aug 1, 2012 · 1 revision

Any rule can be extended to perform additional processing of a parameter value. This might be helpful, for example, when there are several preprocessing stages or a certain constraints should be applied if, and only if, some condition is satisfied:

username isAlnum
if (!debug) {
  username isUniqueUsername
}

Here the isUniqueUsername validator is applied in addition to isAlnum only when the debug variable is coerced to false.