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

Breadcrumb

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

function Constraint::checkUndefined

Checks a undefined element

Parameters

mixed $value:

mixed $schema:

JsonPointer|null $path:

mixed $i:

9 calls to Constraint::checkUndefined()
CollectionConstraint::validateItems in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/CollectionConstraint.php
Validates the items
ObjectConstraint::validateElement in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php
Validates the element properties
ObjectConstraint::validatePatternProperties in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php
ObjectConstraint::validateProperties in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php
Validates the definition properties
SchemaConstraint::check in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/SchemaConstraint.php
invokes the validation of an element

... See full list

File

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

Class

Constraint
The Base Constraints, all Validators should extend this class

Namespace

JsonSchema\Constraints

Code

protected function checkUndefined(&$value, $schema = null, ?JsonPointer $path = null, $i = null, $fromDefault = false) {
    $validator = $this->factory
        ->createInstanceFor('undefined');
    $validator->check($value, $this->factory
        ->getSchemaStorage()
        ->resolveRefSchema($schema), $path, $i, $fromDefault);
    $this->addErrors($validator->getErrors());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal