CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

fix: respect complex language strings when using validation

Open michalsn opened this issue 1 year ago • 2 comments

Description This PR fixes a bug where complex language strings in the validation class are not handled properly.

The problem was that in the validation class, we were forming the final message using the str_replace() function, instead of using the built-in solutions that MessageFormatter::formatMessage gives us.

Checklist:

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

michalsn avatar Sep 25 '24 06:09 michalsn

I tried it and it seems to work fine. Thanks @michalsn

dgvirtual avatar Sep 28 '24 12:09 dgvirtual

@dgvirtual Ok, thank you for testing it out.

michalsn avatar Sep 28 '24 19:09 michalsn