Problem with custom validation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Problem with custom validation (/showthread.php?tid=77922) |
Problem with custom validation - akisthess79 - 11-04-2020 Hello all. I'm new to CI4. I'm really excited about the new way of coding. I use CI3 for the last 6 years. I began to rewriite an application from CI3 to CII4 but I stack with a problem using custom validation. I have added my custom validation file in App\Config\Validation.php Code: public $ruleSets = [ This is the VisitorsAreaRules.php. The password in the db is not encrypted, is just varchar for now. That's why I don't use password_verify. Code: <?php And this is my class Code: <?php namespace App\Controllers\World\Parents; It returns the bellow error: validateVisitor(username, password) is not a valid rule. Please, can anyone tell me what I do wrong? Thank you in advance. RE: Problem with custom validation - akisthess79 - 11-05-2020 This is the error message that returns. I tried some changes but still I cannot find where is the error. RE: Problem with custom validation - akisthess79 - 11-06-2020 It was typo error. The problem were in my controller file. I use ( ) instead of [ ] when I pass the fields in validateVisitor function. |