Codeigniter 4 unique value for single user |
I have a form to let user to register their IGN for a few games. I would like to make the IGN unique, meaning User A can have ignA for any games that he is playing into the database. If User B were to register his IGN in the database using any of the IGN registered by User A, it will show error as that is unique. But I have no clue how do I go about doing this.
After searching for so long, I have managed to find this but I am not sure whether is it what I am looking for. I have tried and I get an error and I can't figure out what's wrong with the string. Below is my code : Code: public function game_reg() Hope someone out there can help me on what and how do I do a check for this case. Thanks in advance guys!
PHP Code: acc_id' => 'required|is_unique' You have no parameters for is_unique on this line. |
Welcome Guest, Not a member yet? Register Sign In |