A ValidationRule that makes sure the numeric value is greater than given n
.
A ValidationRule that makes sure the numeric value is less than given n
.
A ValidationRule that makes sure the string value is longer than n
symbols.
A ValidationRule that makes sure the string value is shorter than n
symbols.
Implicit conversion that allows the same inline rules to be used for required and optional values.
Implicit conversion that allows the same inline rules to be used for required and optional values. If the optional value is non-empty, it gets validated (and validation may fail, producing error), but if it is empty, it is always treated as valid.
In order to help the compiler determine the case when inline rule should be converted, the type of the validated value should be specified explicitly.
paramOption("foo").should("be greater than 50") { i: Int => i > 50 }
the underlying function to convert