Validation and redirect

Good morning guys, I have the following problem and I would like some help:
In the controller, I perform a double validation, occupying 2 specific fields of the views, it works fine, that is, if the condition is true, it returns an error message, and then I perform a redirect. What’s going on? that the redirect is for the add and it works fine, but when performing the redirect, the form remains empty.
Is there a way to perform the redirect but without the empty fields? Or do you recommend that I do it in another way?
I share code snippet to visualize better.

if ($this->request->is('post')) {
     $delivery = $this->Deliveries->patchEntity($delivery, $this->request->getData());
     $users = $delivery->users_id;
     $usersC = $this->Deliveries->users->find()
            ->select(['id'])
            ->where(['id' => $users]);
     $usersd = $usersC->first();

            if(!$usersd && $delivery->delivered == 0){
                $this->Flash->error("error message");
                return $this->redirect(['controller' => 'Deliveries', 'action' => 'add']);
            }
}

Thanks for your help

You’re redirecting to the same page? Just don’t do that redirect.

Basically, what I want is for the form not to be sent, so even though the condition is true, the form is still sent. That is the reason for the redirect at this time.

What do you mean you don’t want the form to be sent? The processing you are doing here is only run when you get a post request, which means the form has already been sent. If you don’t want to save the data you get from it, just don’t save it. No need to redirect to avoid that.