How to use is_unique? |
I have a controller with code:
PHP Code: ...... other code ..... And now....In my app/Config/Validation.php I write next property: PHP Code: public $myrules = [ How I can transfer in THIS rule my VARIABLE WITH user ID??!!! I want to GET the next code (as example): PHP Code: public $myrules = [ My QUESTION: "HOW TO SEND VARIABLE VALUE IN THE LAST ARGUMENT FROM MY CONTROLLER DINAMICALLY?"
The placeholder should be replaced automatically by the value in the data array. See https://codeigniter4.github.io/userguide...aceholders
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ (04-18-2020, 03:40 PM)includebeer Wrote: The placeholder should be replaced automatically by the value in the data array. See https://codeigniter4.github.io/userguide...aceholders Have you carefully read my question? Pay attention to my post! Did I ask somewhere about Models? I asked how to make validation from the controller, and not from Models.
Hey, calm down. It's not with that kind of attitude that you'll get help here.
Since the Controller and Model both use the Validation library, I assumed they both work the same way. I looked at the code and it seems only the Model take care of the placeholders in the rules, with its fillPlaceholders() function.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ (04-19-2020, 04:47 AM)includebeer Wrote: Hey, calm down. It's not with that kind of attitude that you'll get help here. I'm from Russia and sorry for my bad English! I used Google Translate service to describe my problem and probably my text was strict. I'm very sad at this version of Codeigniter. This is not release! It's maximum is BETA! I meet everyday so many bugs on each step in development process! In Views (I'm wrote in github)- bugs, In Models - bugs, In Libraries - bugs (as this) and so on.
Hi, I'm sad you feel that way about the software. But these are new found bugs that no one discovered in the release candidate face. As with all open source project, finding people to test the software are hard. Our user base for CodeIgniter 4 have increased significantly after the official release, because people actually start using everything.
That's why there are a lot of bugs to take care of at the moment. More people using it, in different ways. Leading to different "bugs" and solutions. This particular bug have got a Pull request the other day, but haven't been merged in just yet. https://github.com/codeigniter4/CodeIgniter4/pull/2819 |
Welcome Guest, Not a member yet? Register Sign In |