4 {{# def.setupKeyword }}
5 {{# def.setupNextLevel }}
12 for ($property in $schema) {
13 var $sch = $schema[$property];
14 var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
15 $deps[$property] = $sch;
19 var {{=$errs}} = errors;
21 {{ var $currentErrorPath = it.errorPath; }}
24 {{ for (var $property in $propertyDeps) { }}
25 {{ $deps = $propertyDeps[$property]; }}
26 if ({{=$data}}{{= it.util.getProperty($property) }} !== undefined
28 && ({{# def.checkMissingProperty:$deps }})) {
29 {{# def.errorMissingProperty:'dependencies' }}
32 {{~ $deps:$reqProperty }}
33 {{# def.allErrorsMissingProperty:'dependencies' }}
36 } {{# def.elseIfValid }}
40 it.errorPath = $currentErrorPath;
41 var $currentBaseId = $it.baseId;
45 {{ for (var $property in $schemaDeps) { }}
46 {{ var $sch = $schemaDeps[$property]; }}
47 {{? {{# def.nonEmptySchema:$sch }} }}
48 {{=$nextValid}} = true;
50 if ({{=$data}}{{= it.util.getProperty($property) }} !== undefined) {
53 $it.schemaPath = $schemaPath + it.util.getProperty($property);
54 $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
57 {{# def.insertSubschemaCode }}
60 {{# def.ifResultValid }}
66 if ({{=$errs}} == errors) {