Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -9,14 +9,10 @@
|
||||
|
||||
namespace App\Validator\Constraints;
|
||||
|
||||
use Doctrine\Common\Annotations\Annotation\Target;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
* @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"})
|
||||
*/
|
||||
class TimesheetMultiUser extends Constraint
|
||||
#[\Attribute(\Attribute::TARGET_CLASS)]
|
||||
final class TimesheetMultiUser extends Constraint
|
||||
{
|
||||
public const MISSING_USER_OR_TEAM = 'ts-multi-user-01';
|
||||
|
||||
@@ -24,9 +20,9 @@ class TimesheetMultiUser extends Constraint
|
||||
self::MISSING_USER_OR_TEAM => 'You must select at least one user or team.',
|
||||
];
|
||||
|
||||
public $message = 'This form has invalid settings.';
|
||||
public string $message = 'This form has invalid settings.';
|
||||
|
||||
public function getTargets()
|
||||
public function getTargets(): string|array
|
||||
{
|
||||
return self::CLASS_CONSTRAINT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user