Actions
Bug #91340
closedRegEx validator in EXT:form does not support negative lookbehind
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2020-05-07
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint
Description
I tried to use this regular expression to allow all email addresses but not those ending with @qq.com:
/^.+@.+(?<!@qq.com)$/g
There are two problem with the regex validator of EXT:form when you want to use an expression with negative lookbehind:
1. The GUI of the TYPO3 backend cuts the regular expression when there is a < in the expression.
2. Even if you edit the yaml file in the file system and enter the expression manually, you end up with the following exception:
TYPO3\\CMS\\Extbase\\Validation\\Exception\\InvalidValidationOptionsException: regularExpression \"/^.+@.+(?<!@qq.com)$/g\" in RegularExpressionValidator contained an error. in /var/www/html/public/typo3/sysext/extbase/Classes/Validation/Validator/RegularExpressionValidator.php:51
Actions