2015-06-03 03:36:59 +03:00
|
|
|
{{# def.definitions }}
|
2015-12-12 16:41:51 +03:00
|
|
|
{{# def.errors }}
|
2015-12-22 20:03:09 +03:00
|
|
|
{{# def.setupKeyword }}
|
2015-06-03 03:36:59 +03:00
|
|
|
{{# def.setupNextLevel }}
|
|
|
|
|
2015-06-13 00:10:56 +03:00
|
|
|
{{? {{# def.nonEmptySchema:$schema }} }}
|
|
|
|
{{
|
|
|
|
$it.schema = $schema;
|
|
|
|
$it.schemaPath = $schemaPath;
|
2015-12-19 13:52:39 +03:00
|
|
|
$it.errSchemaPath = $errSchemaPath;
|
2015-06-13 00:10:56 +03:00
|
|
|
}}
|
2015-05-30 23:08:31 +03:00
|
|
|
|
2015-06-13 15:01:05 +03:00
|
|
|
var {{=$errs}} = errors;
|
2015-06-02 03:59:32 +03:00
|
|
|
|
2015-10-25 23:54:19 +03:00
|
|
|
{{# def.setCompositeRule }}
|
|
|
|
|
2016-02-28 02:01:03 +03:00
|
|
|
{{
|
|
|
|
$it.createErrors = false;
|
|
|
|
var $allErrorsOption;
|
|
|
|
if ($it.opts.allErrors) {
|
|
|
|
$allErrorsOption = $it.opts.allErrors;
|
|
|
|
$it.opts.allErrors = false;
|
|
|
|
}
|
|
|
|
}}
|
2015-06-13 00:10:56 +03:00
|
|
|
{{= it.validate($it) }}
|
2016-02-28 02:01:03 +03:00
|
|
|
{{
|
|
|
|
$it.createErrors = true;
|
|
|
|
if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
|
|
|
|
}}
|
2015-05-30 23:08:31 +03:00
|
|
|
|
2015-10-25 23:54:19 +03:00
|
|
|
{{# def.resetCompositeRule }}
|
|
|
|
|
2016-12-24 01:02:41 +03:00
|
|
|
if ({{=$nextValid}}) {
|
2015-06-13 00:10:56 +03:00
|
|
|
{{# def.error:'not' }}
|
2015-06-13 15:01:05 +03:00
|
|
|
} else {
|
2015-12-12 16:41:51 +03:00
|
|
|
{{# def.resetErrors }}
|
2015-06-13 00:10:56 +03:00
|
|
|
{{? it.opts.allErrors }} } {{?}}
|
|
|
|
{{??}}
|
2015-08-16 03:21:35 +03:00
|
|
|
{{# def.addError:'not' }}
|
2015-06-13 00:10:56 +03:00
|
|
|
{{? $breakOnError}}
|
|
|
|
if (false) {
|
|
|
|
{{?}}
|
2015-06-14 12:05:45 +03:00
|
|
|
{{?}}
|