conformation
Advanced tools
Comparing version 0.11.0 to 0.12.0
@@ -28,2 +28,3 @@ 'use strict'; | ||
keys: function keys(schema) { | ||
this.keySchemas = schema; | ||
return this.rule(keysRule, { schema: schema }); | ||
@@ -30,0 +31,0 @@ } |
{ | ||
"name": "conformation", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "Yet another object validator", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -304,2 +304,11 @@ | ||
it('should allow access to key rules', function () { | ||
let schema = Schema.object().keys({ | ||
a: Schema.number() | ||
}); | ||
let a = schema.keySchemas.a; | ||
expect(a.validate(1).valid).to.be.true; | ||
}); | ||
it('should set path and key properly', function () { | ||
@@ -306,0 +315,0 @@ let schema = Schema.object().keys({ |
28578
787