Make Validation Config to Extend BaseConfig |
I am creating a project which includes so may plug and play modules, I use Registrar to Extend Filters and Some other Configs, But the Validation Config doesn't extend the BaseConfig so I can't add rules to it except I modify it directly.
It would be nice to place all rules into a $rules property so that different modules can add theirs to it. e.g PHP Code: <?php
I wasn’t even aware! I’m not sure why this isn’t the case, but if you send over a Pull Request it should stir up any relevant discussion on the topic.
Hi,I also had this problem. I have already created a topic in this link, but no one has sent a reply.
Now Registrars can add rules.
https://github.com/codeigniter4/CodeIgniter4/pull/5789 (03-08-2022, 11:18 PM)kenjis Wrote: Now Registrars can add rules. Hi, I am still unable to figure out to use Registrar to extend Validation in modules (without making change to app/Config/Validation.php). May I ask if anyone can share a sample script? (10-14-2022, 05:06 AM)kenjis Wrote: See https://github.com/codeigniter4/shield/b...ar.php#L31 Hi, Thank you very much for a prompt solution. The issue has been solved (as per your guide). Regards.
|
Welcome Guest, Not a member yet? Register Sign In |