Feature #23633
openregex in TCA eval function
0%
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)
Files
Updated by Steffen Kamper about 14 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 about 14 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.
Updated by Alexander Opitz over 9 years ago
- Description updated (diff)
- Category set to Backend API
- Target version deleted (
0)
Updated by Sybille Peters over 6 years ago
Thank you for your report.
Even though it has been some time, would you consider checking if your patch idea is still up to date and upload it to our Gerrit review server?
Someone could do this for you, but I am thinking you might like the opportunity to contribute to TYPO3 yourself.
You can find a description of the TYPO3 contribution workflow here: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/
Hint: If you get stuck anywhere, ask on Slack in the #typo3-cms-coredev channel. You can register in the TYPO3 slack workspace here: https://forger.typo3.com/slack
Thank you in advance!
Updated by Julian Hofmann over 6 years ago
It is still a nice feature (and we need it actually).
This syntax i would prefer: regex(/any expression/any modifier)
Thinking about a better syntax, my idea was to have a look at extbase validators syntax. In my opinion, it would be nice to have consistent syntax for same properties in a project/software.
Extbase uses e.g.: regularExpression(regularExpression="/^[0-9]{5}$/")
@Robert Lemke: Currently the patch would only allow modifiers which consists of one single character
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68762
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68762
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68762
Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68762
Updated by Gerrit Code Review over 3 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68762
Updated by Gerrit Code Review over 3 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68762
Updated by Gerrit Code Review about 3 years ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68762
Updated by Gerrit Code Review over 2 years ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68762