CodeIgniter4
CodeIgniter4 copied to clipboard
fix: respect complex language strings when using validation
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
I tried it and it seems to work fine. Thanks @michalsn
@dgvirtual Ok, thank you for testing it out.