npm ajv 3.0.0

latest releases: 8.12.0, 8.11.2, 8.11.1...
8 years ago

v5 $data reference to use values from the validated data as values for schema keywords.
New formats: uuid, json-pointer, relative-json-pointer.
Option loopRequired to limit the size of compiled validation function in case of very large number of required properties.
Improved macro keywords:

  • simpler code and faster compilation.
  • macro keyword adds the error.
  • macro keyword can be limited to some data type(s).

npm run bundle now creates minified UMD browser bundle with source map.

Changes

Previously Ajv was compiling "required" keyword as if the option loopRequired was set to 21. Currently the default value is Infinity (better performance but larger validation function in case of many required properties).
Function for inline keyword receives keyword as the second parameter. See Inline keywords.
Errors for custom keywords now have actual keyword in error.keyword property (previously "custom").

Don't miss a new ajv release

NewReleases is sending notifications on new releases.