You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
348 B

4 years ago
  1. {{# def.definitions }}
  2. {{# def.errors }}
  3. {{# def.setupKeyword }}
  4. {{# def.$data }}
  5. {{
  6. var $regexp = $isData
  7. ? '(new RegExp(' + $schemaValue + '))'
  8. : it.usePattern($schema);
  9. }}
  10. if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
  11. {{# def.error:'pattern' }}
  12. } {{? $breakOnError }} else { {{?}}