Feature #23633

regex in TCA eval function

Added by Robert Heel over 2 years ago. Updated 10 months ago.

Status:New Start date:2010-09-28
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
TYPO3 Version:4.4 Complexity:
PHP Version:5.2
Votes: 1 (View)

Description

Would be nice to use regex in eval to check values of input fields.

With the attached patch you can use
'eval' => 'trim,lower,/[a-z0-9 _-]*/'
in your TCA configuration.

http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.3.0/view/4/2/#id2520906

(issue imported from #M15836)

eval_regex.diff (967 Bytes) Administrator Admin, 2010-09-28 19:04

History

Updated by Steffen Kamper over 2 years ago

indeed no bad idea, but i wouldn't do it this way. it depends on delimiter = / and doesn't allow modifiers.

This syntax i would prefer: regex(/any expression/any modifier)

Updated by Robert Heel over 2 years ago

Thanks! The patch already allows a modifier (search for / at last and next to last position). Existing expressions also not function-style - so I have chosen this syntax.

Also available in: Atom PDF