References Validator
Reference
C
Class

ApiPlatform\Symfony\Validator\Validator

Validates an item using the Symfony validator component.

class ApiPlatform\Symfony\Validator\Validator implements ApiPlatform\Validator\ValidatorInterface
{
    public __construct(Symfony\Component\Validator\Validator\ValidatorInterface $validator, null|Psr\Container\ContainerInterface $container, null|bool $legacyValidationException)
    public validate(object $data, array $context): null
}

Methods

__construct

public __construct(Symfony\Component\Validator\Validator\ValidatorInterface $validator, null|Psr\Container\ContainerInterface $container, null|bool $legacyValidationException)

Parameters

validatorSymfony\Component\Validator\Validator\ValidatorInterface
containerPsr\Container\ContainerInterface
legacyValidationExceptionbool

validate

Validates an item.

public validate(object $data, array $context): null

Parameters

dataobject
contextarray

Returns

null

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop