I use [email protected].
Ajv options object
{}
JSON Schema
{
"type": "integer",
"minimum": 0
}
Sample data
"abc"
In node REPL:
> const Ajv = require('ajv');
undefined
> const validator = (new Ajv({})).compile({type: 'integer', minimum: 0});
undefined
> validator(1);
true
> validator('1');
true
> validator('abc');
true
What results did you expect?
Expect to validate integer.
@Niklv thanks for reporting.
That's the consequence of #485.
Version 5.0.1 is ok
fixed in 5.1.1
Most helpful comment
fixed in 5.1.1