9 lines
291 B
Plaintext
9 lines
291 B
Plaintext
{{# def.definitions }}
|
|
{{# def.errors }}
|
|
{{# def.setup:'pattern' }}
|
|
|
|
{{ new RegExp($schema); /* test if regexp is valid to fail at compile time rather than in eval */}}
|
|
if (! {{= it.usePattern($schema) }}.test({{=$data}}) ) {
|
|
{{# def.error:'pattern' }}
|
|
} {{? $breakOnError }} else { {{?}}
|