CodeIgniter4
CodeIgniter4 copied to clipboard
feat: require double curly braces for placeholders in `regex_match` rule
Description
This PR updates the validation behavior for the regex_match rule to require double curly braces {{...}} for placeholders instead of single ones {...}.
Using single braces for placeholders conflicts with valid regex syntax, such as quantifiers ({1,3}), which can lead to invalid regex patterns and hard-to-debug validation issues.
What changed:
- Placeholder parsing within
regex_matchnow requires{{value}} - Single-brace placeholders like
{value}will no longer be parsed withinregex_match
Fixes #9596
Checklist:
- [x] Securely signed commits
- [x] Component(s) with PHPDoc blocks, only if necessary or adds value
- [x] Unit testing, with >80% coverage
- [x] User guide updated
- [x] Conforms to style guide