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

Oliver Hader oh at inpublica.de
Thu Aug 9 11:43:01 CEST 2007


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.


olly
-- 
Oliver Hader
http://inpublica.de/


More information about the TYPO3-team-core mailing list