Task #92465

TCA eval 'alpha' discards umlaut characters

Added by Remo Schneider 26 days ago. Updated 1 day ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2020-10-01
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Sprint Focus:

Description

I'm unable to insert special characters like 'ä' into an input field that is configured with

'eval' => 'alpha'
in TCA, however, 'alpha' is the only available option against non-word characters.

It should at least be mentioned in the documentation, or, if possible, adjusted to allow characters beyond A-Z that are no spaces, numbers or other non-word characters.

System overview:
TYPO3 Version 10.4.9
Webserver Apache/2.4.38 (Debian)
PHP Version 7.4.9
Database (Default) MySQL 5.7.29
Application Context Development
Operating System Linux 4.15.0-118-generic

History

#1 Updated by Guido Schmechel 6 days ago

HI Remo, i found this documentation: https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/inputDefault.html?highlight=eval#id15 I think "alpha" is correctly documented.

My opinion: If we include the umlauts in this list, other eval functions are also affected, then we would have to consider other languages/characters. Example: Chinese, Greece or something else.

There is a hook and you can define your own "alpha" eval function:

$value = preg_replace('/[^a-zäöüA-ZÄÖÜß]/', '', $value);

Maybe this will help you?

#2 Updated by Remo Schneider 1 day ago

Yes, thank you! I will use the hook then.

Also available in: Atom PDF