lib/Core/Validator/Validator.php
public function validateId($id, ?string $propertyPath = null): void
    {
        $this->validate(
            $id,
            [
                new Constraints\NotBlank(),
                new Constraints\Type(['type' => 'scalar']),
            ],
            $propertyPath
        );
    }
public function validateId($id, ?string $propertyPath = null): void
    {
        $this->validate(
            $id,
            [
                new Constraints\NotBlank(),
                new Constraints\Type(['type' => 'scalar']),
            ],
            $propertyPath
        );
    }
public function validateId ( $ id , ? string $ propertyPath = null ) : void { $ this -> validate ( $ id , [ new Constraints \ NotBlank ( ) , new Constraints \ Type ( [ 'type' => 'scalar' ] ) , ] , $ propertyPath ) ; }
Validates the provided ID to be an integer or string.

Use the $propertyPath to change the name of the validated property in the error message.

@param int|string $id
@param string $propertyPath

@throws \Netgen\BlockManager\Exception\Validation\ValidationException If the validation failed
Validates the provided ID to be an integer or string .