Problem with custom validation |
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.
This is the error message that returns. I tried some changes but still I cannot find where is the error.
![]()
It was typo error. The problem were in my controller file. I use ( ) instead of [ ] when I pass the fields in validateVisitor function.
|
Welcome Guest, Not a member yet? Register Sign In |