Skip to content

Conversation

@michalsn
Copy link
Member

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:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added bug Verified issues on the current code behavior or pull requests that will fix them breaking change Pull requests that may break existing functionalities 4.7 labels Jun 10, 2025
@michalsn michalsn merged commit 15f56bb into codeigniter4:4.7 Jun 16, 2025
50 checks passed
@michalsn
Copy link
Member Author

Thank you @paulbalandan

@michalsn michalsn deleted the feat/match-regex-placeholder branch June 16, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.7 breaking change Pull requests that may break existing functionalities bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants