Skip to content

Releases: ajv-validator/ajv

3.5.0

01 Feb 18:24
Compare
Choose a tag to compare

Asynchronous validation using custom keywords and formats that make some asynchronous calls/requests.

Passed Ajv options are cloned and ajv.opts is renamed to _opts. It is not recommended to modify options of the existing instance as it may lead to inconsistent behaviour in schemas with references.

3.4.0

17 Jan 21:59
Compare
Choose a tag to compare

Option coerceTypes to coerce data types to match type in schema. See Coercing data types.

3.3.0

16 Jan 14:34
Compare
Choose a tag to compare

Option addUsedSchema - if set to false, methods validate and compile don't add the schema to the instance. See Options. The default is true.

3.2.0

09 Jan 14:56
Compare
Choose a tag to compare

useDefaults option to assign defaults to missing properties and items.

3.1.0

08 Jan 09:58
Compare
Choose a tag to compare

Option multipleOfPrecision (#84)
Browser bundle is included in npm package (to publish on cdnjs)
Fixed dependencies keyword (#94)

3.0.0

27 Dec 22:03
Compare
Choose a tag to compare

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").

2.5.0

19 Dec 19:07
Compare
Choose a tag to compare

schemaPath in errors.

2.4.0

12 Dec 22:05
Compare
Choose a tag to compare

switch keyword from from JSON-schema v5 proposals.
v5 meta-schema used by default with option v5.

2.3.0

11 Dec 21:44
Compare
Choose a tag to compare

Added parentSchema property to error option when option verbose is true.

2.2.0

05 Dec 21:30
Compare
Choose a tag to compare

time format
formatMaximum/formatMinimum and exclusiveFormatMaximum/exclusiveFormatMinimum from JSON-schema v5 proposals with option v5