- Type shortcuts now also include
String,Number,BooleanandDate. - The
customvalidator can now take an array of functions.
- Opt-in to
nullvalues using theallowNullvalidator. - The object
allowUnknownKeysvalidator has been deprecated in favour of the newunknownKeysvalidator.
Version
>= 0.2.4 < 1.0.0has a bug wherenullis sometimes validated even when input is required. Version 1.0.0 fixes this and introduces the commonallowNullvalidator to control the behaviour ofnullvalues.
- Bug fixes and internal improvements.
typeandcustomcan now be used alongside each other.- Default functions and custom validators now also works synchronously.
- Strings now has an
enumvalidator. - Changed license to MIT
- Improved this file with a TOC
- Added middleware for Connect/Express (from isvalid-express).
- It now catches more errors in schemas - such as wrong values on validators.
- Schema errors are now thrown as a
SchemaErrorwhich contains schema that failed through theschemaproperty. - The library is now completely asynchronous - allowing for I/O while formalizing, validating and comparing.
- Formalizer is publicly exposed in order to pre-formalize schemas manually.
- Schemas are now formalized per demand. Large schemas are formalized by the validator as they are needed.
- ValidationErrors now contain the pre-formalized schema - for better identification by developer.
- Automatic parsing of ISO-8601 dates into Date - contributed by thom-nic.
- Errors are thrown if validators are used out of context.
- ValidationError now contains the
validatorproperty - specifying which validator actually failed. - You can now specify custom error messages using the
errorvalidator. Objectnow supports theallowUnknownKeysvalidator.