• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
'validation' => $this->validation


'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 Smile

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...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.