Hello friends!
In Codeigniter3 we can use helper function
form_error() to display single error.
e.g:
echo form_error('username'); // systax of CI3.
But in codeigniter4 we have to write like this:
// create object of validation.
$validation = \Config\Services::validation();
echo $[b]validation->getError('username');[/b]
So its very tedious task (in CI4) to create object in every view page and then display single error.
Is there any helper function likes CI3 that we can use in CI4 ?