Comparing version 0.2.5 to 0.2.6
@@ -23,2 +23,3 @@ 'use strict'; | ||
schemaPath: '', | ||
path: '""', | ||
RULES: RULES, | ||
@@ -25,0 +26,0 @@ validate: validateGenerator, |
@@ -5,3 +5,3 @@ {{# def.definitions }} | ||
{{? it.resolveRef($schema) }} | ||
var result{{=$lvl}} = validateRef('{{=$schema}}', {{=$data}}, dataPath{{=$dataLvl}}); | ||
var result{{=$lvl}} = validateRef('{{=$schema}}', {{=$data}}, dataPath0 + {{= it.path }}); | ||
var {{=$valid}} = result{{=$lvl}}.valid; | ||
@@ -8,0 +8,0 @@ if (!{{=$valid}}) validate.errors.push.apply(validate.errors, result{{=$lvl}}.errors); |
@@ -66,3 +66,3 @@ {{## def.setup:keyword: | ||
keyword: '{{=rule}}', | ||
dataPath: dataPath{{=$dataLvl}}, | ||
dataPath: {{= it.path }}, | ||
message: {{# def._errorMessages[rule] }} | ||
@@ -69,0 +69,0 @@ {{? it.opts.verbose }}, schema: {{# def._errorSchemas[rule] }}, data: {{=$data}}{{?}} |
@@ -8,5 +8,5 @@ {{# def.definitions }} | ||
for (var i{{=$lvl}} = {{=startFrom}}; i{{=$lvl}} < {{=$data}}.length; i{{=$lvl}}++) { | ||
var data{{=$dataNxt}} = {{=$data}}[i{{=$lvl}}] | ||
, dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + '[' + i{{=$lvl}} + ']'; | ||
var data{{=$dataNxt}} = {{=$data}}[i{{=$lvl}}]; | ||
{{ $it.path = it.path + ' + "[" + i' + $lvl + ' + "]"'; }} | ||
{{= it.validate($it) }}; | ||
@@ -44,5 +44,5 @@ | ||
var data{{=$dataNxt}} = {{=$data}}[{{= $i }}] | ||
, dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + '[{{=$i}}]'; | ||
var data{{=$dataNxt}} = {{=$data}}[{{= $i }}]; | ||
{{ $it.path = it.path + ' + "[' + $i + ']"'; }} | ||
{{= it.validate($it) }} | ||
@@ -49,0 +49,0 @@ } |
@@ -68,5 +68,5 @@ {{# def.definitions }} | ||
var data{{=$dataNxt}} = {{=$data}}[key{{=$lvl}}] | ||
, dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + property(key{{=$lvl}}); | ||
var data{{=$dataNxt}} = {{=$data}}[key{{=$lvl}}]; | ||
{{ $it.path = it.path + ' + property(key' + $lvl + ')'; }} | ||
{{= it.validate($it) }}; | ||
@@ -99,3 +99,3 @@ | ||
if (data{{=$dataNxt}} !== undefined) { | ||
var dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + "{{=$prop}}"; | ||
{{ $it.path = it.path + ' + "' + $prop + '"'; }} | ||
{{= it.validate($it) }}; | ||
@@ -124,5 +124,5 @@ } | ||
if (keyMatches{{=$lvl}}) { | ||
var data{{=$dataNxt}} = {{=$data}}[key{{=$lvl}}] | ||
, dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + property(key{{=$lvl}}); | ||
var data{{=$dataNxt}} = {{=$data}}[key{{=$lvl}}]; | ||
{{ $it.path = it.path + ' + property(key' + $lvl + ')'; }} | ||
{{= it.validate($it) }}; | ||
@@ -129,0 +129,0 @@ {{? $breakOnError }} if (!valid{{=$it.level}}) break; {{?}} |
{ | ||
"name": "ajv", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Another JSON schema Validator", | ||
@@ -5,0 +5,0 @@ "main": "lib/ajv.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5857
190761