source: trip-planner-front/node_modules/css-minimizer-webpack-plugin/node_modules/ajv/lib/dot/contains.jst@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.2 KB
Line 
1{{# def.definitions }}
2{{# def.errors }}
3{{# def.setupKeyword }}
4{{# def.setupNextLevel }}
5
6
7{{
8 var $idx = 'i' + $lvl
9 , $dataNxt = $it.dataLevel = it.dataLevel + 1
10 , $nextData = 'data' + $dataNxt
11 , $currentBaseId = it.baseId
12 , $nonEmptySchema = {{# def.nonEmptySchema:$schema }};
13}}
14
15var {{=$errs}} = errors;
16var {{=$valid}};
17
18{{? $nonEmptySchema }}
19 {{# def.setCompositeRule }}
20
21 {{
22 $it.schema = $schema;
23 $it.schemaPath = $schemaPath;
24 $it.errSchemaPath = $errSchemaPath;
25 }}
26
27 var {{=$nextValid}} = false;
28
29 for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
30 {{
31 $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
32 var $passData = $data + '[' + $idx + ']';
33 $it.dataPathArr[$dataNxt] = $idx;
34 }}
35
36 {{# def.generateSubschemaCode }}
37 {{# def.optimizeValidate }}
38
39 if ({{=$nextValid}}) break;
40 }
41
42 {{# def.resetCompositeRule }}
43 {{= $closingBraces }}
44
45 if (!{{=$nextValid}}) {
46{{??}}
47 if ({{=$data}}.length == 0) {
48{{?}}
49
50 {{# def.error:'contains' }}
51 } else {
52 {{? $nonEmptySchema }}
53 {{# def.resetErrors }}
54 {{?}}
55 {{? it.opts.allErrors }} } {{?}}
Note: See TracBrowser for help on using the repository browser.