-
Notifications
You must be signed in to change notification settings - Fork 264
Open
Description
Inertia adapter(s) affected
- React
- Vue 3
- Svelte
- Not Applicable
JS package version
2.0.5
Backend stack (optional)
No response
Describe the problem
I'm not sure if I'm missing something but when there are multiple validation errors, Laravel should return an array of validation errors see https://laravel.com/docs/12.x/validation#validation-error-response-format. Currently, in the errors
prop, there is always only one validation error the first one.
Steps to reproduce
Create a form in Svelte with a text input and the following rule: "username" => ["required", "alpha:ascii", "min:1", "max:3"]
. Add a number, make it longer than three and see only the alpha
rule error appear. Is this intended, or am I missing something? How can I show all validation errors each on a newline for example?
This is also true with vue.js:
Instead of
username: [
"The username field must only contain letters.",
"The username field must not be greater than 3 characters"
]
Metadata
Metadata
Assignees
Labels
No labels