![]() |
Make Validation Config to Extend BaseConfig - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29) +--- Thread: Make Validation Config to Extend BaseConfig (/showthread.php?tid=81180) |
Make Validation Config to Extend BaseConfig - sadiqsalau - 02-01-2022 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 RE: Make Validation Config to Extend BaseConfig - MGatner - 02-06-2022 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. RE: Make Validation Config to Extend BaseConfig - datamweb - 02-18-2022 Hi,I also had this problem. I have already created a topic in this link, but no one has sent a reply. RE: Make Validation Config to Extend BaseConfig - kenjis - 03-08-2022 Now Registrars can add rules. https://github.com/codeigniter4/CodeIgniter4/pull/5789 RE: Make Validation Config to Extend BaseConfig - ipmeel - 10-14-2022 (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? RE: Make Validation Config to Extend BaseConfig - kenjis - 10-14-2022 See https://github.com/codeigniter4/shield/blob/f4cdfb672b600a032a6f0bfc0b7735411bee0cae/src/Config/Registrar.php#L31 and https://codeigniter4.github.io/CodeIgniter4/general/configuration.html#registrars RE: Make Validation Config to Extend BaseConfig - ipmeel - 10-14-2022 (10-14-2022, 05:06 AM)kenjis Wrote: See https://github.com/codeigniter4/shield/blob/f4cdfb672b600a032a6f0bfc0b7735411bee0cae/src/Config/Registrar.php#L31 Hi, Thank you very much for a prompt solution. The issue has been solved (as per your guide). Regards. RE: Make Validation Config to Extend BaseConfig - sadiqsalau - 10-14-2022 It works now ![]() |