mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Indicate user to set startDate equal to or greater than today + set empty_data in form content field
This commit is contained in:
parent
d87cf925e2
commit
3a74c48104
@ -46,6 +46,7 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface
|
|||||||
private string $content = '';
|
private string $content = '';
|
||||||
|
|
||||||
#[Assert\NotNull]
|
#[Assert\NotNull]
|
||||||
|
#[Assert\GreaterThanOrEqual('today')]
|
||||||
#[Groups(['read'])]
|
#[Groups(['read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: false)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: false)]
|
||||||
private ?\DateTimeImmutable $startDate = null;
|
private ?\DateTimeImmutable $startDate = null;
|
||||||
|
@ -29,6 +29,7 @@ class NewsItemType extends AbstractType
|
|||||||
])
|
])
|
||||||
->add('content', ChillTextareaType::class, [
|
->add('content', ChillTextareaType::class, [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
'empty_data' => '',
|
||||||
])
|
])
|
||||||
->add(
|
->add(
|
||||||
'startDate',
|
'startDate',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user