[TYPO3-dev] checking the values of TCA user fields
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Mon Aug 28 14:36:04 CEST 2006
Dmitry Dulepov schrieb:
> Hi!
>
> Martin Kutschker wrote:
>
>> Does it makes sense to add "evalFunc"? To me a field specific function
>> is cleaner than a hook function that needs to check for the "right"
>> table/field in the data.
>
> But how do you check that value is valid? It cannot be PHP, must be
> JavaScript currently.
No. Althpough there is a "live" check with JS, the value is checked with
PHP again (without feedback!).
The JS can (and must) be added by the rendering function.
The check functions are more post-processing functions for transformation
and clean-ups than validation. Nonetheless a user fields may need such
transformations as well. Stupid example: external represention of an
integer as a binary numeber (with 0 and 1). On "check" the string needs to
be converted.
Masi
More information about the TYPO3-dev
mailing list