Issue Bug Closed

#69650Domain Model with one optional DateTime validator

ondro no-lastname-given 09/10/15, 15:48 updated 09/10/15, 16:01

Description

Hey

I’m not sure if it’s a bug but:

I have Domain model with some properties. One of the property has annotation

/** * start * * var \DateTime * validate DateTime(d.m.Y)
*/
protected $start = NULL;

other properties are without any validation. When I create form with property=“start” and I leave input blank I’m getting following error:

#1: PHP Warning: Illegal offset type in isset or empty in …/typo3/sysext/extbase/Classes/Error/Result.php line 214

When i insert something to input I got proper error action with validation results.

When I add to model other validation i.e.:

/** * title * * var string * validate NotEmpty
*/
protected $title = ‘’;

And I fill title input and leave start input blank I got proper error action with validation results. (that means I got validation error on start that start input was empty)

Is it bug or I’m doing something wrong

Thank you

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.