Unable to use validation rules that I set to the Config file |
Hi, I am trying to perform form validation for user registration page with CodeIgniter 4. To do this I have written below codes in Validation.php file located in Config directory.
Config/Validation.php PHP Code: public $userSignUp = [ Then I get this "userSignup" rule in my Users controller. Controllers/Users.php PHP Code: <?php namespace App\Controllers; Finally, to display those errors in the registration page. Views/user_register.php PHP Code: <?php if(isset($validation)): ?> But, when I submit the form, I get this error "userSignup is not a validation rules group". What is going wrong with my code? |
Messages In This Thread |
Unable to use validation rules that I set to the Config file - by nileshsanyal - 09-20-2020, 08:18 AM
RE: Unable to use validation rules that I set to the Config file - by InsiteFX - 09-20-2020, 05:12 PM
RE: Unable to use validation rules that I set to the Config file - by nileshsanyal - 09-21-2020, 07:13 AM
RE: Unable to use validation rules that I set to the Config file - by InsiteFX - 09-21-2020, 09:08 AM
|