WIP: Implement profile validation
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Validator\Constraints;
|
||||
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
|
||||
#[\Attribute]
|
||||
class BankAccount extends Constraint
|
||||
{
|
||||
public string $message = 'Die Bankverbindung ist unvollständig';
|
||||
|
||||
public function __construct(string $message = null, array $groups = null, $payload = null)
|
||||
{
|
||||
parent::__construct([], $groups, $payload);
|
||||
|
||||
$this->message = $message ?? $this->message;
|
||||
}
|
||||
|
||||
public function getTargets(): string
|
||||
{
|
||||
return Constraint::CLASS_CONSTRAINT;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user