Files
dualfroz 6a4be2daab fix(Validators): allow pipe in pattern regular expressions
The 'pattern:' argument of Validators::is() crashed on a valid regular
expression containing a pipe, e.g. Validators::is('a', 'pattern:(a|b)').

Two parsing bugs combined: the expression was split into validators on every
'|', tearing the regexp apart, and the pipe was also used as the PCRE
delimiter. A 'pattern:' argument now consumes the rest of the expression and
the delimiter is changed to '~', with the pattern anchored as a whole so bare
alternations work too. Pipe-as-OR semantics for combined validators are kept.

Fixes nette/utils#206
2026-09-04 09:22:41 +02:00
..