Changelog
0.7.0
breaking
validation()
method has been renamed to test()
and has a new signature requiring a name
argumentstring().max(10).max(15)
has a max of 15
instead of 10
other changes
abortEarly
(default: true
) optionChangelog
0.6.2
null
values e.g string.max()
Changelog
0.6.0
breaking
extend
and create
methods. Use whatever javascript inheritance patterns you want instead.null
values.
null
will coerce to false
when nullable()
is not specified. NaN
values will now fail isType()
checksnull
will coerce to ''
when nullable()
is not specifiednull
, but left as invalid date, This is probably not a problem for anyone as invalid dates will also fail isType()
checkswhen()
actually worked (it didn't)other changes
transform()
now passes the original value to each transformer. Allowing you to recover from a bad transform.equals()
alias for oneOf
Changelog
0.5.0
breaking
other changes