Pre format rules ignored - CI4 Validation |
Hi Team,
If I apply any rule to CI4 Validation that returns string instead of boolean, that rule is skipped. No effect on data output / formatting. Like this. PHP Code: $validation->setRules([ PHP Code: $request->getPostGet('username'); // Username is not trimmed. This used to be working fine in CI3. How can I attain the same in CI4?
You need to run it through the validation.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(10-23-2020, 05:24 PM)InsiteFX Wrote: You need to run it through the validation. I did create rules that has 'trim' rule, Run the validation and I got true. Input had spaces: ' sammiel '; I was hoping that after running the validation, I would get output without spaces. But the output had spaces as well - the reason why I posted my question in these forums.
Then you may have found a bug so report it on GitHub issues.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |