WIP: feature_paste #1
|
@ -11,14 +11,12 @@ class PasteFormData
|
||||||
{
|
{
|
||||||
#[Assert\NotBlank]
|
#[Assert\NotBlank]
|
||||||
public string $text;
|
public string $text;
|
||||||
#[Assert\Type(\boolean::class)]
|
|
||||||
public bool $private;
|
public bool $private;
|
||||||
skobkin marked this conversation as resolved
Outdated
|
|||||||
public ?string $language = null;
|
public ?string $language = null;
|
||||||
public ?string $description = null;
|
public ?string $description = null;
|
||||||
public ?string $filename = null;
|
public ?string $filename = null;
|
||||||
#[Assert\NotBlank]
|
#[Assert\NotBlank]
|
||||||
public string $author = 'anonymous';
|
public string $author = 'anonymous';
|
||||||
#[Assert\Type(\DateTimeImmutable::class)]
|
|
||||||
public ?\DateTimeImmutable $expirationDate;
|
public ?\DateTimeImmutable $expirationDate;
|
||||||
skobkin marked this conversation as resolved
skobkin
commented
Why Why `string` and `Assert\NotBlank`?
|
|||||||
public string $ip;
|
public string $ip;
|
||||||
|
|
||||||
skobkin marked this conversation as resolved
skobkin
commented
Is this validation being processed BEFORE storing the data in the DTO? Is this validation being processed BEFORE storing the data in the DTO?
If not, it's pointless as with `bool` field earlier.
|
|||||||
|
|
Loading…
Reference in a new issue
Huh?