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

Ingmar Schlecht ingmar at typo3.org
Fri Nov 9 23:04:37 CET 2007


The patch looks clear and straight-forward, 1+.

I presume you have tested it properly.

cheers
Ingmar


Oliver Hader schrieb:
> Hi Masi,
> 
> Oliver Hader schrieb:
>> Hi Masi,
>>
>> 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.
> 
> 
> olly
> 


-- 
Ingmar Schlecht
TYPO3 Association Active Member


More information about the TYPO3-team-core mailing list