[TYPO3-mvc] Re: Validating Datetime field

Douwe Doornbos d.doornbos at rug.nl
Fri Jul 1 16:30:12 CEST 2016


Anybody? Do you need more info?

Quote: Douwe Doornbos (doornbos) wrote on Tue, 17 May 2016 12:06
----------------------------------------------------
> I have a form with a datetime field. The problem is that when i enter an invalid date f.e. 32-1-1990 it is converted to 1-2-1990, without giving an error message. How can I validate this?
> 
> I tried adding my own validator with @validate. But the property has already been converted before entering my own validator.
> 
> Is there an action in the controller available that i can use?
> 
> Definition in domain class is:
> 
> /**
>  * datefield
>  *
>  * @var \DateTime
>  */
> protected $datefield= '';
> 
> 
> Thank you in advance.
> 
> Douwe.
> 
----------------------------------------------------




More information about the TYPO3-project-typo3v4mvc mailing list