Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Output sub-item form-errors messages when they exist #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Patabugen
Copy link

When validating an array Laravel lets us validate array items using the fieldname.* syntax which can result in the error bag containing messages which are returned as fieldname.<array_index>.

These are not output at the moment, this PR is a simple fix to (recursively) output them if they exist.

I've just extended the <x-form-errors> component to output them as their own messages, an enhancement might be to make them smarter or display in a more inline way..

There were no existing tests for form-errors, so apologies for not adding one and starting those.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant