lib/Core/Validator/CollectionValidator.php
public function validateCollectionUpdateStruct(Collection $collection, CollectionUpdateStruct $collectionUpdateStruct): void
    {
        if ($collectionUpdateStruct->offset !== null) {
            $offsetConstraints = [
                new Constraints\NotBlank(),
                new Constraints\Type(['type' => 'int']),
            ];

            $offsetConstraints[] = $collection->hasQuery() ?
                new Constraints\GreaterThanOrEqual(['value' => 0]) :
                new Constraints\EqualTo(['value' => 0]);

            $this->validate(
                $collectionUpdateStruct->offset,
                $offsetConstraints,
                'offset'
            );
        }

        if ($collectionUpdateStruct->limit !== null) {
            $this->validate(
                $collectionUpdateStruct->limit,
                [
                    new Constraints\NotBlank(),
                    new Constraints\Type(['type' => 'int']),
                    new Constraints\GreaterThanOrEqual(['value' => 0]),
                ],
                'limit'
            );
        }
    }
public function validateCollectionUpdateStruct(Collection $collection, CollectionUpdateStruct $collectionUpdateStruct): void
    {
        if ($collectionUpdateStruct->offset !== null) {
            $offsetConstraints = [
                new Constraints\NotBlank(),
                new Constraints\Type(['type' => 'int']),
            ];

            $offsetConstraints[] = $collection->hasQuery() ?
                new Constraints\GreaterThanOrEqual(['value' => 0]) :
                new Constraints\EqualTo(['value' => 0]);

            $this->validate(
                $collectionUpdateStruct->offset,
                $offsetConstraints,
                'offset'
            );
        }

        if ($collectionUpdateStruct->limit !== null) {
            $this->validate(
                $collectionUpdateStruct->limit,
                [
                    new Constraints\NotBlank(),
                    new Constraints\Type(['type' => 'int']),
                    new Constraints\GreaterThanOrEqual(['value' => 0]),
                ],
                'limit'
            );
        }
    }
public function validateCollectionUpdateStruct ( Collection $ collection , CollectionUpdateStruct $ collectionUpdateStruct ) : void { if ( $ collectionUpdateStruct -> offset !== null ) { $ offsetConstraints = [ new Constraints \ NotBlank ( ) , new Constraints \ Type ( [ 'type' => 'int' ] ) , ] ; $ offsetConstraints [ ] = $ collection -> hasQuery ( ) ? new Constraints \ GreaterThanOrEqual ( [ 'value' => 0 ] ) : new Constraints \ EqualTo ( [ 'value' => 0 ] ) ; $ this -> validate ( $ collectionUpdateStruct -> offset , $ offsetConstraints , 'offset' ) ; } if ( $ collectionUpdateStruct -> limit !== null ) { $ this -> validate ( $ collectionUpdateStruct -> limit , [ new Constraints \ NotBlank ( ) , new Constraints \ Type ( [ 'type' => 'int' ] ) , new Constraints \ GreaterThanOrEqual ( [ 'value' => 0 ] ) , ] , 'limit' ) ; } }
Validates the provided collection update struct.

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