[TYPO3-core] RFC: Bug 5956: TCA eval required on date field does not work
oh at inpublica.de
Tue Aug 21 09:51:58 CEST 2007
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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5931 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070821/f8ad3bb9/attachment.bin
More information about the TYPO3-team-core