File size: 348 Bytes
4a51346
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.$data }}

{{
  var $regexp = $isData
                ? '(new RegExp(' + $schemaValue + '))'
                : it.usePattern($schema);
}}

if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
  {{# def.error:'pattern' }}
} {{? $breakOnError }} else { {{?}}