When using minLength i allways get this error: TypeError: Cannot read property 'minLength' of undefined
var register_schema = schemaEnv.Schema.create({
type: 'object',
properties: {
email: {
type: 'string',
minLength: 6,
maxLength: 200,
optional: false
}
}
var v = register_schema.validate({email:'bobs@youruncle.com'});
TypeError: Cannot read property 'minLength' of undefined
at /usr/local/lib/node_modules/schema/i18n/default.js:23:57
at new (/usr/local/lib/node_modules/schema/lib/validation.js:69:44)
at [object Object]. (/usr/local/lib/node_modules/schema/lib/validation.js:205:14)
at [object Object].callPlugin (/usr/local/lib/node_modules/schema/lib/validation.js:186:18)
at [object Object].minLength (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:453:12)
at [object Object].type (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:148:22)
at [object Object].start (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:37:20)
at [object Object].properties (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:276:18)
at [object Object].type (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:174:22)
at [object Object].start (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:37:20)
When using minLength i allways get this error: TypeError: Cannot read property 'minLength' of undefined
TypeError: Cannot read property 'minLength' of undefined at /usr/local/lib/node_modules/schema/i18n/default.js:23:57 at new (/usr/local/lib/node_modules/schema/lib/validation.js:69:44)
at [object Object]. (/usr/local/lib/node_modules/schema/lib/validation.js:205:14)
at [object Object].callPlugin (/usr/local/lib/node_modules/schema/lib/validation.js:186:18)
at [object Object].minLength (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:453:12)
at [object Object].type (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:148:22)
at [object Object].start (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:37:20)
at [object Object].properties (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:276:18)
at [object Object].type (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:174:22)
at [object Object].start (/usr/local/lib/node_modules/schema/lib/draft-02/validation.js:37:20)