pattern.jst 348 B

1234567891011121314
  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 { {{?}}