Sha256: 6dce62a53347c32200b4ba3d2707294cbd06d6f00676aa1e9db2e056aeb13a0d

Contents?: true

Size: 917 Bytes

Versions: 53

Compression:

Stored size: 917 Bytes

Contents

{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.setupNextLevel }}

var {{=$errs}} = errors;
var prevValid{{=$lvl}} = false;
var {{=$valid}} = false;

{{ var $currentBaseId = $it.baseId; }}
{{# def.setCompositeRule }}

{{~ $schema:$sch:$i }}
  {{? {{# def.nonEmptySchema:$sch }} }}
    {{
      $it.schema = $sch;
      $it.schemaPath = $schemaPath + '[' + $i + ']';
      $it.errSchemaPath = $errSchemaPath + '/' + $i;
    }}

    {{# def.insertSubschemaCode }}
  {{??}}
    var {{=$nextValid}} = true;
  {{?}}

  {{? $i }}
    if ({{=$nextValid}} && prevValid{{=$lvl}})
      {{=$valid}} = false;
    else {
    {{ $closingBraces += '}'; }}
  {{?}}

    if ({{=$nextValid}}) {{=$valid}} = prevValid{{=$lvl}} = true;
{{~}}

{{# def.resetCompositeRule }}

{{= $closingBraces }}

if (!{{=$valid}}) {
  {{# def.error:'oneOf' }}
} else {
  {{# def.resetErrors }}
{{? it.opts.allErrors }} } {{?}}

Version data entries

53 entries across 53 versions & 7 rubygems

Version Path
ilog-0.4.1 node_modules/ajv/lib/dot/oneOf.jst
ilog-0.4.0 node_modules/ajv/lib/dot/oneOf.jst
ilog-0.3.3 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-18.0.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.21.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.20.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.19.1 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.19.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.18.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.17.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.16.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.15.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.14.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.13.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.12.2 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.12.1 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.12.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.11.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.10.0 node_modules/ajv/lib/dot/oneOf.jst
govuk_publishing_components-17.9.0 node_modules/ajv/lib/dot/oneOf.jst