Closed Mirodil closed 11 years ago
here is my schema
var jsv = require('JSV').JSV.createEnvironment(); jsv.createSchema({ "$schema": "http://json-schema.org/draft-03/schema#", "id": "urn:user#", "type": "object", "additionalProperties": false, "properties": { "email": { "description": "Author email address", "type": "string", "format": 'email', "required": true }, "password": { "description": "User password", "type": "string", "required": true }, "nickname":{ "description": "Author nick name", "type": "string", "maxLength": 50, "required": false } } });
validate the following JSON data:
{ "email": "maer007@mail", "password": "Hello World", "nickname": "Maer" }
email is invalid but JSV check and there was not any errors.
Technically that is a valid email address. However, the more important note is that JSV does not validate on the "format" attribute as it is not required by the spec.
here is my schema
validate the following JSON data:
email is invalid but JSV check and there was not any errors.