Welcome Guest, Not a member yet? Register   Sign In
How to get old validation errors
#3

(03-01-2020, 08:54 AM)MGatner Wrote: You should pass the error messages during the redirect, using "with($name, $content)", e.g.: https://codeigniter4.github.io/userguide...l#redirect

Ok. Thank you! But why they are saved as flash data?

PHP Code:
$validator Services::validation();
if (! empty(
$validator->getErrors()))
{
    $session->setFlashdata('_ci_validation_errors'serialize($validator->getErrors()));

Reply


Messages In This Thread
How to get old validation errors - by falko - 02-26-2020, 02:21 PM
RE: How to get old validation errors - by MGatner - 03-01-2020, 08:54 AM
RE: How to get old validation errors - by falko - 03-05-2020, 10:57 AM
RE: How to get old validation errors - by falko - 03-08-2020, 03:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB