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
edcc01149b
commit
57b8dacba0
@ -46,6 +46,7 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface
|
||||
private string $content = '';
|
||||
|
||||
#[Assert\NotNull]
|
||||
#[Assert\GreaterThanOrEqual('today')]
|
||||
#[Groups(['read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: false)]
|
||||
private ?\DateTimeImmutable $startDate = null;
|
||||
|
@ -29,6 +29,7 @@ class NewsItemType extends AbstractType
|
||||
])
|
||||
->add('content', ChillTextareaType::class, [
|
||||
'required' => false,
|
||||
'empty_data' => '',
|
||||
])
|
||||
->add(
|
||||
'startDate',
|
||||
|
Loading…
x
Reference in New Issue
Block a user