kriszyp/json-schema

null validates as a valid integer

Opened this issue · 0 comments

changing https://github.com/kriszyp/json-schema/blob/master/lib/validate.js#L91 to be

!(type == 'integer' && value%1===0 && value !== null)

seems to fix it for me