Is your feature request related to a problem? Please describe.
My server returns errors that are not related to a particular field under the key '_error'. Currently when I try to set errors on formik, the errors are ignored because they do not match any keys in my values.
Describe the solution you'd like
I'd like for there to be the possibility of non-field errors stored in some sort of user specified key.
Describe alternatives you've considered
Alternatives would be...storing this in a values field, but that's hacky.
Additional context
This is the kind of thing that status was meant to be used for.
When you get an error back from your server save it using setStatus(yourError) and access it from the status prop.
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.
ProBot automatically closed this due to inactivity. Holler if this is a mistake, and we'll re-open it.
This is the kind of thing that status was meant to be used for.
When you get an error back from your server save it using
setStatus(yourError)and access it from the status prop.
As an addition (because this helped me):
Use as mentioned:
props.setStatus('Your error string')
But also access it in your template via props.status or if you prefer object destructuring:
const { status } = props
console.log(status) // 'Your error string'
Most helpful comment
This is the kind of thing that status was meant to be used for.
When you get an error back from your server save it using
setStatus(yourError)and access it from the status prop.