[TYPO3-mvc] Validating Datetime field

Douwe Doornbos d.doornbos at rug.nl
Tue May 17 12:06:36 CEST 2016


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