Feature #23633
regex in TCA eval function
| 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.
(issue imported from #M15836)
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.