35 lines
632 B
Plaintext
35 lines
632 B
Plaintext
{{# def.definitions }}
|
|
{{# def.setup:'not' }}
|
|
{{# def.setupNextLevel }}
|
|
|
|
{{? {{# def.nonEmptySchema:$schema }} }}
|
|
{{
|
|
$it.schema = $schema;
|
|
$it.schemaPath = $schemaPath;
|
|
}}
|
|
|
|
var {{=$errs}} = errors;
|
|
|
|
{{# def.setCompositeRule }}
|
|
|
|
{{= it.validate($it) }}
|
|
|
|
{{# def.resetCompositeRule }}
|
|
|
|
if (valid{{=$it.level}}) {
|
|
{{# def.error:'not' }}
|
|
} else {
|
|
errors = {{=$errs}};
|
|
if (vErrors !== null) {
|
|
if ({{=$errs}}) vErrors.length = {{=$errs}};
|
|
else vErrors = null;
|
|
}
|
|
|
|
{{? it.opts.allErrors }} } {{?}}
|
|
{{??}}
|
|
{{# def.addError:'not' }}
|
|
{{? $breakOnError}}
|
|
if (false) {
|
|
{{?}}
|
|
{{?}}
|