<?php
namespace App\Validator;
use Symfony\Component\Validator\Constraint;
/**
* @Annotation
*/
class FlexenergieEmail extends Constraint
{
public $message = 'L\'email doit se terminer par @flexenergie.fr sur ce domaine.';
public $domain;
public function __construct($options = null)
{
parent::__construct($options);
$this->domain = $options['domain'] ?? null;
}
public function validatedBy()
{
return static::class.'Validator';
}
}