Hi,
I wonder why this exemple
taken from tutorial in codeigniter4 user guide,
public function create()
{
helper('form');
$model = new NewsModel();
if (! $this->validate($this->request, [
'title' => 'required|min[3]|max[255]',
'text' => 'required'
]))
{
makes an error :
Argument 1 passed to CodeIgniter\Validation\Validation:
etRules() must be of the type array, object given, called in ...
Thanks for your help