src/Form/Validator/Constraints/PhoneAndEmailNotBlank.php line 38
<?phpdeclare(strict_types=1);/*** Copyright (c) 2022 TECLA Consulting Group oü.* All rights reserved.** This unpublished material is proprietary to TECLA Consulting Group oü.* All rights reserved. The methods and* techniques described herein are considered trade secrets* and/or confidential. Reproduction or distribution, in whole* or in part, is forbidden except by express written permission* of TECLA Consulting Group oü.** @author Matúš Sýkorjak <matus@tecla.no>* @copyright 2022 TECLA Consulting Group oü*/namespace App\Form\Validator\Constraints;use Symfony\Component\Validator\Constraint;use Symfony\Component\Validator\Exception\MissingOptionsException;final class PhoneAndEmailNotBlank extends Constraint{public const IS_BLANK_PHONE_AND_EMAIL_ERROR = '16107a97-2402-4a3c-b3fc-a7e9ff8c47d3';public string $message = 'Phone and e-mail should not be empty.';public ?string $phonePropertyPath = null;public ?string $emailPropertyPath = null;protected static $errorNames = [self::IS_BLANK_PHONE_AND_EMAIL_ERROR => 'IS_BLANK_PHONE_AND_EMAIL_ERROR',];public function __construct(array $options = null,?array $groups = null,mixed $payload = null,?string $message = null,?string $phonePropertyPath = null,?string $emailPropertyPath = null) {parent::__construct($options ?? [], $groups, $payload);$this->message = $message ?? $this->message;$this->phonePropertyPath = $phonePropertyPath ?? $this->phonePropertyPath;$this->emailPropertyPath = $emailPropertyPath ?? $this->emailPropertyPath;if (null === $this->phonePropertyPath) {throw new MissingOptionsException(sprintf('Option "phonePropertyPath" must be given for constraint "%s".', __CLASS__), ['phonePropertyPath']);}if (null === $this->emailPropertyPath) {throw new MissingOptionsException(sprintf('Option "emailPropertyPath" must be given for constraint "%s".', __CLASS__), ['emailPropertyPath']);}}public function getTargets(): array|string{return self::CLASS_CONSTRAINT;}}