Skip to content

ValidationException breaking Volt #136

Open
@leandroneves-net

Description

@leandroneves-net

Volt Version

1.7.0

Laravel Version

12.14.1

PHP Version

8.3.6

Database Driver & Version

No response

Description

Using $validator->validate() on a service cause the following error on blade:
Uncaught Snapshot missing on Livewire component with id: v8Azl0xMTGnP3s95KjPz

If I rewrite the code to

        try {
            $validator->validate();
        } catch (ValidationException $e) {
            Log::error('Validate() error: ' . $e->getMessage());
            throw new \InvalidArgumentException('Validate() error: ' . $e->getMessage());  
       }

The program works fine.

Steps To Reproduce

Using $validator->validate() on a service cause the following error on blade:
Uncaught Snapshot missing on Livewire component with id: v8Azl0xMTGnP3s95KjPz

If I rewrite the code to

        try {
            $validator->validate();
        } catch (ValidationException $e) {
            Log::error('Validate() error: ' . $e->getMessage());
            throw new \InvalidArgumentException('Validate() error: ' . $e->getMessage());  
       }

The program works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions