check
Apply multiple validation functions to a value
Parameters
funcs: Function
:Validation function to apply
Example
const isRequired = check(exists("It should exist"))
isRequired("value")
checkWrapper
Helper wrapper for creating validation function
Parameters
func: Function (=()=>true)
:Function used for validation
Example
function longerThanFive(msg) {
return checkWrapper(val => val.length > 5)(msg)
}