Actions
Bug #17468
closedTCA eval required on date field does not work
Start date:
2007-07-12
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
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)
Files
Updated by Oliver Hader over 17 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 over 17 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 over 17 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 17 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 17 years ago
I've uploaded a new patch with a small modification for recent changes in Trunk.
Updated by Oliver Hader almost 17 years ago
Committed to SVN:
- TYPO3_4-1 (rev. 2754)
- Trunk (rev. 2755)
Actions