error in validation documentation? |
I've been reading the documentation on validation, (https://codeigniter4.github.io/userguide...ation.html) and following the mini-tutorial. But it results in an error: "Undefined property: App\Controllers\Form::$validation".
In the Form.php controller, shouldn't Code: 'validation' => $this->validation be Code: 'validation' => $this->validator I'm very new to codeigniter, so apologies if I'm misunderstanding something!
I think you are right! "validator" is a controller property, and makes sense here.
Thanks for pointing it out ![]()
I think it could be understood both ways.
Indeed, $this->validator is not instanciated before calling validate(...). Is not the documentation more about "instanciating an object in variable $validation and play with it"? Not very clear... |
Welcome Guest, Not a member yet? Register Sign In |