Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Constraint.php

function Constraint::checkArray

Validates an array

Parameters

mixed $value:

mixed $schema:

JsonPointer|null $path:

mixed $i:

1 call to Constraint::checkArray()
UndefinedConstraint::validateTypes in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php
Validates the value against the types

File

vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php, line 68

Class

Constraint
The Base Constraints, all Validators should extend this class

Namespace

JsonSchema\Constraints

Code

protected function checkArray(&$value, $schema = null, ?JsonPointer $path = null, $i = null) {
    $validator = $this->factory
        ->createInstanceFor('collection');
    $validator->check($value, $schema, $path, $i);
    $this->addErrors($validator->getErrors());
}
RSS feed
Powered by Drupal