Skip to content
zhaber edited this page Aug 2, 2012 · 3 revisions

The logic for conversion of a parameter value from String to one of the other supported types is defined by type converters: toInt, toBoolean, toBigDecimal, toChar, toLong, and to<Type>List, where <Type> is Int, Boolean, BigDecimal, Char, or Long. The job of these converters is to check that a value of a parameter can be transformed to a target type and then return a result of the conversion. A converter throws the ValidationException if the value can not be casted to the corresponding type. As an example, to validate an integer parameter that has to be greater than ten you can use the combination of functions toInt and gt (greater than):

id toInt >> gt(10)