Welcome Guest, Not a member yet? Register   Sign In
setRules
#1

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:ConfusedetRules() must be of the type array, object given, called in ...

Thanks for your help
Reply




Theme © iAndrew 2016 - Forum software by © MyBB