Open kirstu opened 6 years ago
bug report
Submission errors to "deep" fields do not propagate to field level meta.submissionError prop. I.e. if one would have a form with state of
meta.submissionError
{ 'profile.userName': 'Aasd', }
and submitting this data would result in the following error object from submit function:
{ 'profile.userName': 'This value wont do', }
The above error will not show up in the field for profile.userName.
profile.userName
See sandbox for reproduction: https://codesandbox.io/s/0o9lmozrmv
The field meta should have submissionError set to 'This value wont do'.
submissionError
https://codesandbox.io/s/0o9lmozrmv
"react-final-form": "^3.6.5" "final-form": "^4.9.1"
The error object has to have the same structure as the form data.
In your example: { 'profile': { 'userName': 'This value wont do' } } Should work fine.
{ 'profile': { 'userName': 'This value wont do' } }
Does this help?
Should be closed.
Are you submitting a bug report or a feature request?
bug report
What is the current behavior?
Submission errors to "deep" fields do not propagate to field level
meta.submissionError
prop. I.e. if one would have a form with state ofand submitting this data would result in the following error object from submit function:
The above error will not show up in the field for
profile.userName
.See sandbox for reproduction: https://codesandbox.io/s/0o9lmozrmv
What is the expected behavior?
The field meta should have
submissionError
set to 'This value wont do'.Sandbox Link
https://codesandbox.io/s/0o9lmozrmv
What's your environment?
"react-final-form": "^3.6.5" "final-form": "^4.9.1"
Other information