Project

General

Profile

Actions

Bug #91340

closed

RegEx validator in EXT:form does not support negative lookbehind

Added by Peter Kraume almost 4 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
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

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #90640: ext:form - RegularExpressionValidator with empty value will lead to exceptionClosedBjörn Jacob2020-03-04

Actions
Related to TYPO3 Core - Bug #102143: Regular Expression is cut offClosed2023-10-11

Actions
Actions

Also available in: Atom PDF