mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 01:08:26 +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:
		| @@ -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', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user