2
I’m using Altorouter to make the page call of my project, and in his doc says that to use "Match Types" custom just add
$router->addMatchTypes(array('cId' => '[a-zA-Z]{2}[0-9](?:_[0-9]++)?'));
However, I tried using this rule: |^[\pL\s]+$|u
, that validates letters (including accents) and spaces and did not work, I saw that the standard rules that are in the class are like this:
protected $matchTypes = array(
'i' => '[0-9]++',
'a' => '[0-9A-Za-z]++',
'h' => '[0-9A-Fa-f]++',
'*' => '.+?',
'**' => '.++',
'' => '[^/\.]++',
);
I also tried to insert the rule already in the class and also did not succeed, I understand very little of Regex, but it seems that the standard rules are written in a different way and "lean", following this pattern, as I can validate only letters (including with accents), spaces and numbers?