lib/Core/Validator/LayoutValidator.php
public function validateLayoutCopyStruct(LayoutCopyStruct $layoutCopyStruct): void
    {
        $layoutName = is_string($layoutCopyStruct->name) ?
            trim($layoutCopyStruct->name) :
            $layoutCopyStruct->name;

        $this->validate(
            $layoutName,
            [
                new Constraints\NotBlank(),
                new Constraints\Type(['type' => 'string']),
            ],
            'name'
        );

        if ($layoutCopyStruct->description !== null) {
            $this->validate(
                $layoutCopyStruct->description,
                [
                    new Constraints\Type(['type' => 'string']),
                ],
                'description'
            );
        }
    }
public function validateLayoutCopyStruct(LayoutCopyStruct $layoutCopyStruct): void
    {
        $layoutName = is_string($layoutCopyStruct->name) ?
            trim($layoutCopyStruct->name) :
            $layoutCopyStruct->name;

        $this->validate(
            $layoutName,
            [
                new Constraints\NotBlank(),
                new Constraints\Type(['type' => 'string']),
            ],
            'name'
        );

        if ($layoutCopyStruct->description !== null) {
            $this->validate(
                $layoutCopyStruct->description,
                [
                    new Constraints\Type(['type' => 'string']),
                ],
                'description'
            );
        }
    }
public function validateLayoutCopyStruct ( LayoutCopyStruct $ layoutCopyStruct ) : void { $ layoutName = is_string ( $ layoutCopyStruct -> name ) ? trim ( $ layoutCopyStruct -> name ) : $ layoutCopyStruct -> name ; $ this -> validate ( $ layoutName , [ new Constraints \ NotBlank ( ) , new Constraints \ Type ( [ 'type' => 'string' ] ) , ] , 'name' ) ; if ( $ layoutCopyStruct -> description !== null ) { $ this -> validate ( $ layoutCopyStruct -> description , [ new Constraints \ Type ( [ 'type' => 'string' ] ) , ] , 'description' ) ; } }
Validates the provided layout copy struct.

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