I’m updating an extension for usage in TYPO3 v10 or higher and have an issue with a regular Expression validator, i don’t know how to get in runnable in v10 or higher now. Tried the following:
/**
* action list
*
* @param string $filterChar
* @ExtbaseValidate("RegularExpression",options={ "regularExpression": "/^[0-9A-Za-z]{0,1}$/i" })
* @return void
*/
public function listAction(string $filterChar = '') {
But i got the following exception:
Invalid validate annotation in ABCMyExtControllerMyController->listAction(): The following validators have been defined for missing param "$": RegularExpression
What i’m doing wrong and how can i fix it, or what is the correct definition now for a RegularExpression validator for an action parameter?