Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

anonymouse703's avatar

How to clear validation error after re-open modal with error message?

Hi guys, How to clear validation error after re-open modal with error message?

I already have this listener in open and close modal

protected $listeners = [
        'resetInputFields',
    ];

    public function resetInputFields()
    {
        $this->reset();
    }

also tried

    public function resetInputFields()
    {
        $this->reset('name');
    }

But still doesn't clear

0 likes
3 replies
tatenda's avatar
 public isOpen = 0;

public function createBooking()
{
    $this->resetInputFields();
    $this->openModal();
}


public function openModal()
{
    $this->isOpen = true;
}


public function closeModal()
{
    $this->isOpen = false;
}

private function resetInputFields(){
   $this->resetErrorBag();
}

Please or to participate in this conversation.