ogcore/src/Validator/Constraints/PxeTemplateUniqueDefault.php

23 lines
525 B
PHP

<?php
namespace App\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
#[\Attribute]
class PxeTemplateUniqueDefault extends Constraint
{
public string $message;
public function __construct(mixed $options = null, ?array $groups = null, mixed $payload = null)
{
parent::__construct($options, $groups, $payload);
$this->message = 'Ya hay un oglive marcado como predeterminado.';
}
public function getTargets(): string
{
return self::CLASS_CONSTRAINT;
}
}