main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
552 bytes
|
Line | |
---|
1 | {{# def.definitions }}
|
---|
2 | {{# def.errors }}
|
---|
3 | {{# def.setupKeyword }}
|
---|
4 | {{# def.$data }}
|
---|
5 |
|
---|
6 | {{
|
---|
7 | var $i = 'i' + $lvl
|
---|
8 | , $vSchema = 'schema' + $lvl;
|
---|
9 | }}
|
---|
10 |
|
---|
11 | {{? !$isData }}
|
---|
12 | var {{=$vSchema}} = validate.schema{{=$schemaPath}};
|
---|
13 | {{?}}
|
---|
14 | var {{=$valid}};
|
---|
15 |
|
---|
16 | {{?$isData}}{{# def.check$dataIsArray }}{{?}}
|
---|
17 |
|
---|
18 | {{=$valid}} = false;
|
---|
19 |
|
---|
20 | for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++)
|
---|
21 | if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) {
|
---|
22 | {{=$valid}} = true;
|
---|
23 | break;
|
---|
24 | }
|
---|
25 |
|
---|
26 | {{? $isData }} } {{?}}
|
---|
27 |
|
---|
28 | {{# def.checkError:'enum' }}
|
---|
29 |
|
---|
30 | {{? $breakOnError }} else { {{?}}
|
---|
Note:
See
TracBrowser
for help on using the repository browser.