Bug #17468

TCA eval required on date field does not work

Added by Stefano Cecere about 14 years ago. Updated over 13 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


i'm trying to make a date field required ( using a TCA like this:

'tx_cxeurizon_publish_date' => array (
'label' => 'my date field',
'config' => array (
'type' => 'input',
'size' => '8',
'max' => '20',
'eval' => 'required,date',
'checkbox' => '0',
'default' => '0'

but is seems to not work!

in mysql the field is of "int" type (like it should for all timestamp values...

note: i have ext date2cal (6.0.3) installed, but it doesn't work even if i deinstall it...

(issue imported from #M5956)


0005956.patch (5.55 KB) 0005956.patch Administrator Admin, 2007-08-03 17:48
T3X_test_daterequired-0_0_0-z-200708031748.t3x (10.3 KB) T3X_test_daterequired-0_0_0-z-200708031748.t3x Administrator Admin, 2007-08-03 17:48
0005956_v2.patch (5.58 KB) 0005956_v2.patch Administrator Admin, 2007-08-05 13:57
0005956_v3.patch (5.79 KB) 0005956_v3.patch Administrator Admin, 2007-08-21 09:51
0005956_v4_trunk.patch (5.63 KB) 0005956_v4_trunk.patch Administrator Admin, 2007-11-23 15:51

Related issues

Related to TYPO3 Core - Feature #17436: Notify user where required elements are nested in IRRE or TabsClosedOliver Hader2007-07-04

Related to TYPO3 Core - Bug #24489: Wrong variable used in 'evalFunc_outputObjValue'Closed2011-01-06


Updated by Oliver Hader about 14 years ago

I can confirm this behaviour:
  • if the eval is set to "date,required", the unix timestamp will show instead of a formatted date
  • the field is not considered to be required - saving an empty field is allowed and not caught by TBE_EDITOR

Updated by Oliver Hader about 14 years ago

The attached patch file should solve the problems:
  • since "required" had no effect on the evaluation/manipulation of data, this is ignored now in evalfunc (the required-flags are set in TBE_EDITOR!)
  • empty date/datetime fields had a default value of "0" (string!) and this was considered as a filled field and thus no required-error appeared
  • bug #17436 has to be changed after this patch was committed to SVN

Furthermore there is a small test extension which enables you to reproduce this bug.


Updated by Oliver Hader about 14 years ago

I had a bug in evalFunc_outputObjValue:
  • "eval" => "date,required" worked
  • "eval" => "required,date" didn't work
    0005956_v2.patch fixes this issue

Updated by Oliver Hader about 14 years ago

I've added a new patch that has only some small changes concerning names and the possibility to use the new checks concerning date/time (bugfix only) also in further features.


Updated by Oliver Hader almost 14 years ago

I've uploaded a new patch with a small modification for recent changes in Trunk.


Updated by Oliver Hader almost 14 years ago

Committed to SVN:
  • TYPO3_4-1 (rev. 2754)
  • Trunk (rev. 2755)

Also available in: Atom PDF