CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

feat: require double curly braces for placeholders in `regex_match` rule

Open michalsn opened this issue 7 months ago • 0 comments

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_match now requires {{value}}
  • Single-brace placeholders like {value} will no longer be parsed within regex_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

michalsn avatar Jun 10 '25 16:06 michalsn