first commit
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace KupShop\B2BBundle\Twig\Components\B2BUserRegistration;
|
||||
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
class Entity
|
||||
{
|
||||
#[Assert\Sequentially([
|
||||
new Assert\NotBlank(),
|
||||
new Assert\Type('string'),
|
||||
])]
|
||||
public string $name;
|
||||
#[Assert\Sequentially([
|
||||
new Assert\NotBlank(),
|
||||
new Assert\Type('string'),
|
||||
])]
|
||||
public string $surname;
|
||||
#[Assert\Sequentially([
|
||||
new Assert\NotBlank(),
|
||||
new Assert\Email(),
|
||||
])]
|
||||
public string $email;
|
||||
#[Assert\Email]
|
||||
public string $invoice_email;
|
||||
#[Assert\NotBlank]
|
||||
public string $company;
|
||||
public string $phone;
|
||||
#[Assert\Sequentially([
|
||||
new Assert\NotBlank(),
|
||||
new Assert\Length(min: 8, max: 10),
|
||||
new Assert\Type('string'),
|
||||
])]
|
||||
public string $ico;
|
||||
#[Assert\Sequentially([
|
||||
new Assert\NotBlank(),
|
||||
new Assert\Length(min: 10, max: 12),
|
||||
new Assert\Type('string'),
|
||||
])]
|
||||
public string $dic;
|
||||
#[Assert\NotBlank]
|
||||
public string $street;
|
||||
#[Assert\NotBlank]
|
||||
public string $city;
|
||||
#[Assert\NotBlank]
|
||||
public string $psc;
|
||||
#[Assert\NotBlank]
|
||||
public string $country;
|
||||
public string $additional_address;
|
||||
public bool $additional_address_delivery;
|
||||
#[Assert\When(
|
||||
expression: 'this.additional_address_delivery == true',
|
||||
constraints: [new Assert\NotBlank()],
|
||||
)]
|
||||
public string $iname;
|
||||
#[Assert\When(
|
||||
expression: 'this.additional_address_delivery == true',
|
||||
constraints: [new Assert\NotBlank()],
|
||||
)]
|
||||
public string $isurname;
|
||||
#[Assert\When(
|
||||
expression: 'this.additional_address_delivery == true',
|
||||
constraints: [new Assert\NotBlank()],
|
||||
)]
|
||||
public string $istreet;
|
||||
#[Assert\When(
|
||||
expression: 'this.additional_address_delivery == true',
|
||||
constraints: [new Assert\NotBlank()],
|
||||
)]
|
||||
public string $icity;
|
||||
#[Assert\When(
|
||||
expression: 'this.additional_address_delivery == true',
|
||||
constraints: [new Assert\NotBlank()],
|
||||
)]
|
||||
public string $ipsc;
|
||||
}
|
||||
Reference in New Issue
Block a user