This project shows a problem in felte validation when using setData
on array fields where the errors are not properly updated.
yarn install
yarn dev
a
into the new input fielderrors
should show an error in items[0].title
errors
is still `items: [{title: null}]
The problem is that we dont use a native input
field to set the form data but instead use setData
to update the form.
The validator is called and does indeed set
{
"email": [
"Must not be empty",
"Must be a valid email"
],
"items": [
{
"title": [
"title 0 must have length >= 2"
]
}
]
}
but the new validation error object never shows up in the $errors
store from felte.