.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / ajv-keywords / keywords / dot / patternRequired.jst
1 {{# def.definitions }}
2 {{# def.errors }}
3 {{# def.setupKeyword }}
4
5 {{
6   var $key = 'key' + $lvl
7     , $idx = 'idx' + $lvl
8     , $matched = 'patternMatched' + $lvl
9     , $dataProperties = 'dataProperties' + $lvl
10     , $closingBraces = ''
11     , $ownProperties = it.opts.ownProperties;
12 }}
13
14 var {{=$valid}} = true;
15 {{? $ownProperties }}
16   var {{=$dataProperties}} = undefined;
17 {{?}}
18
19 {{~ $schema:$pProperty }}
20   var {{=$matched}} = false;
21   {{# def.iterateProperties }}
22     {{=$matched}} = {{= it.usePattern($pProperty) }}.test({{=$key}});
23     if ({{=$matched}}) break;
24   }
25
26   {{ var $missingPattern = it.util.escapeQuotes($pProperty); }}
27   if (!{{=$matched}}) {
28     {{=$valid}} = false;
29     {{# def.addError:'patternRequired' }}
30   } {{# def.elseIfValid }}
31 {{~}}
32
33 {{= $closingBraces }}