use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\All;
use Symfony\Component\Validator\Constraints\Choice;
use Symfony\Component\Validator\Constraints\Collection;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Required;
use Symfony\Component\Validator\Validator\ValidatorInterface;
//$this->validator - ValidatorInterface (service @validator)
$violations = $this->validator->validate($value, new All([
new Collection([
'email' => [
new NotBlank(),
new Email(),
],
'verified' => [
new Required(),
new Choice(['strict' => true, 'choices' => [1, 0, "1", "0", true, false]]),
],
]),
]));