I' am taking this off the top of my head the way the forms are done in Myth/Auth.
I do recommend that you download it and view the controller and views with forms.
PHP Code:
$rules = [
'title' => 'required|min_length[3]|max_length[255]',
'body' => 'required'
];
if (! $this->validate($rules))
{
return redirect()->back()->withInput()->with('errors', $this->validator->getErrors());
}
Give that a try, I did not have time to test it but like I said Myth/Auth is a great learning module.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )