source: imaps-frontend/node_modules/ajv/lib/dot/anyOf.jst

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 921 bytes
Line 
1{{# def.definitions }}
2{{# def.errors }}
3{{# def.setupKeyword }}
4{{# def.setupNextLevel }}
5
6{{
7 var $noEmptySchema = $schema.every(function($sch) {
8 return {{# def.nonEmptySchema:$sch }};
9 });
10}}
11{{? $noEmptySchema }}
12 {{ var $currentBaseId = $it.baseId; }}
13 var {{=$errs}} = errors;
14 var {{=$valid}} = false;
15
16 {{# def.setCompositeRule }}
17
18 {{~ $schema:$sch:$i }}
19 {{
20 $it.schema = $sch;
21 $it.schemaPath = $schemaPath + '[' + $i + ']';
22 $it.errSchemaPath = $errSchemaPath + '/' + $i;
23 }}
24
25 {{# def.insertSubschemaCode }}
26
27 {{=$valid}} = {{=$valid}} || {{=$nextValid}};
28
29 if (!{{=$valid}}) {
30 {{ $closingBraces += '}'; }}
31 {{~}}
32
33 {{# def.resetCompositeRule }}
34
35 {{= $closingBraces }}
36
37 if (!{{=$valid}}) {
38 {{# def.extraError:'anyOf' }}
39 } else {
40 {{# def.resetErrors }}
41 {{? it.opts.allErrors }} } {{?}}
42{{??}}
43 {{? $breakOnError }}
44 if (true) {
45 {{?}}
46{{?}}
Note: See TracBrowser for help on using the repository browser.