[TYPO3-core] RFC: Bug 5956: TCA eval required on date field does not work

Oliver Hader oh at inpublica.de
Mon Sep 3 10:58:59 CEST 2007


Reminder for RFC #5956


> Oliver Hader schrieb:
>> Martin Kutschker schrieb:
>>> Oliver Hader schrieb:
>>>> Empty date fields are not marked es required because the default value
>>>> of these fields is mostly "0". Since this is seen as string, TBE_EDITOR
>>>> returns a true value on a check. The solution is to send an additional
>>>> flag 'isDateTime' in t3lib_TCEforms to TBE_EDITOR. If it's set,
>>>> TBE_EDITOR knows, that the string "0" is a blank value in this case.
>>> If we call it isPositiveInteger/isPosInt, can it then be used for
>>> required non-zero ints as well?
>> There are two parts for checking values that were configured in "eval":
>> * jsfunc.evalfield.js: Making transformations for e.g. "date" or "int"
>> * jsfunc.tbe_editor.js: Checking if a field is not empty for "required"
>>
>> So, a new eval-property, e.g. "posint", would be a conversion of the
>> field value to integer (evalfield) and additionally a check if the field
>> is non empty and greater than zero (tbe_editor).
>>
>> It would be possible, but I'm not sure about how to set this in the
>> "eval" property in $TCA.
> 
> I've done some modifications to the patch. As you requested, the
> property is now called "isPositiveNumber" and in tbe_editor this is now
> also checked.
-- 
Oliver Hader
http://inpublica.de/


More information about the TYPO3-team-core mailing list