ValidationException breaking Volt
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 423
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
### 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure at the $validator->validate() entry point in a Volt component using the reported PHP, Laravel, and Volt versions, then inspect the interaction with Blade and Livewire validation errors. Done means validation no longer causes the “Snapshot missing” error without requiring the reported exception conversion, with a regression test covering the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- full-stack
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100