4 {{# def.setupKeyword }}
5 {{# def.setupNextLevel }}
8 {{## def.propertyInData:
9 {{=$data}}{{= it.util.getProperty($property) }} !== undefined
11 && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}')
19 , $ownProperties = it.opts.ownProperties;
21 for ($property in $schema) {
22 if ($property == '__proto__') continue;
23 var $sch = $schema[$property];
24 var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
25 $deps[$property] = $sch;
29 var {{=$errs}} = errors;
31 {{ var $currentErrorPath = it.errorPath; }}
34 {{ for (var $property in $propertyDeps) { }}
35 {{ $deps = $propertyDeps[$property]; }}
37 if ({{# def.propertyInData }}
39 && ({{# def.checkMissingProperty:$deps }})) {
40 {{# def.errorMissingProperty:'dependencies' }}
43 {{~ $deps:$propertyKey }}
44 {{# def.allErrorsMissingProperty:'dependencies' }}
47 } {{# def.elseIfValid }}
52 it.errorPath = $currentErrorPath;
53 var $currentBaseId = $it.baseId;
57 {{ for (var $property in $schemaDeps) { }}
58 {{ var $sch = $schemaDeps[$property]; }}
59 {{? {{# def.nonEmptySchema:$sch }} }}
60 {{=$nextValid}} = true;
62 if ({{# def.propertyInData }}) {
65 $it.schemaPath = $schemaPath + it.util.getProperty($property);
66 $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
69 {{# def.insertSubschemaCode }}
72 {{# def.ifResultValid }}
78 if ({{=$errs}} == errors) {