WIP: Implement profile validation

This commit is contained in:
Björn Fromme committed 2023-09-19 16:32:14 +02:00
1 parent dc364cf320
commit 9a95daa3db
7 files changed
+90 -17

No files matched your search

+3 -5
View File
@@ -2,27 +2,25 @@
namespace App\Entity\Embeddable;
use App\Validator\Constraints as AppAssert;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Embeddable]
#[AppAssert\BankAccount]
class BankAccount
{
#[ORM\Column(nullable: true)]
#[Assert\NotBlank(message: 'Bitte angeben')]
#[Assert\Iban(message: 'Diese IBAN ist ungültig')]
#[Assert\Iban(message: 'Die IBAN ist ungültig')]
private ?string $iban = null;
#[ORM\Column(nullable: true)]
#[Assert\NotBlank(message: 'Bitte angeben')]
private ?string $bic = null;
#[ORM\Column(nullable: true)]
#[Assert\NotBlank(message: 'Bitte angeben')]
private ?string $bank = null;
#[ORM\Column(nullable: true)]
#[Assert\NotBlank(message: 'Bitte angeben')]
private ?string $holder = null;
public function getIban(bool $obfuscated = false): ?string