lib/Core/Validator/CollectionValidator.php
public function validateItemCreateStruct(ItemCreateStruct $itemCreateStruct): void
    {
        $this->validate(
            $itemCreateStruct->definition,
            [
                new Constraints\NotNull(),
                new Constraints\Type(['type' => ItemDefinitionInterface::class]),
            ],
            'definition'
        );

        if ($itemCreateStruct->value !== null) {
            $this->validate(
                $itemCreateStruct->value,
                [
                    new Constraints\Type(['type' => 'scalar']),
                ],
                'value'
            );
        }

        $this->validate(
            $itemCreateStruct,
            new ConfigAwareStructConstraint(
                [
                    'payload' => $itemCreateStruct->definition,
                ]
            )
        );
    }
public function validateItemCreateStruct(ItemCreateStruct $itemCreateStruct): void
    {
        $this->validate(
            $itemCreateStruct->definition,
            [
                new Constraints\NotNull(),
                new Constraints\Type(['type' => ItemDefinitionInterface::class]),
            ],
            'definition'
        );

        if ($itemCreateStruct->value !== null) {
            $this->validate(
                $itemCreateStruct->value,
                [
                    new Constraints\Type(['type' => 'scalar']),
                ],
                'value'
            );
        }

        $this->validate(
            $itemCreateStruct,
            new ConfigAwareStructConstraint(
                [
                    'payload' => $itemCreateStruct->definition,
                ]
            )
        );
    }
public function validateItemCreateStruct ( ItemCreateStruct $ itemCreateStruct ) : void { $ this -> validate ( $ itemCreateStruct -> definition , [ new Constraints \ NotNull ( ) , new Constraints \ Type ( [ 'type' => ItemDefinitionInterface :: class ] ) , ] , 'definition' ) ; if ( $ itemCreateStruct -> value !== null ) { $ this -> validate ( $ itemCreateStruct -> value , [ new Constraints \ Type ( [ 'type' => 'scalar' ] ) , ] , 'value' ) ; } $ this -> validate ( $ itemCreateStruct , new ConfigAwareStructConstraint ( [ 'payload' => $ itemCreateStruct -> definition , ] ) ) ; }
Validates the provided item create struct.

@throws \Netgen\BlockManager\Exception\Validation\ValidationException If the validation failed
Validates the provided item create struct .