You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If fieldMeta doesn't exist when an async validator runs, it won't be created. (synchronous validators do cause the meta to get created).
If the meta already exists (because you have a form.Field for that field, or because you do something like setFieldValue('age', 2)), the error gets added to the fieldMeta without a problem.
This issue is a pretty big priority for us because of the way a few things interact:
Yup validators are always async because of this issue. We are using Yup because the way it handles i18n is better for us than Zod.
For compatibility with our old form solution, we use useFormContext to get/set value and state on fields that do not have a form.AppField mounted. I have found that, besides this issues, fieldMeta is the most reliable way to get the error state of fields.
Activity
fix: async validation for unmounted fields
literalpie commentedon Mar 2, 2026
This issue is a pretty big priority for us because of the way a few things interact:
useFormContextto get/set value and state on fields that do not have aform.AppFieldmounted. I have found that, besides this issues, fieldMeta is the most reliable way to get the error state of fields.So I made a PR with a proposed fix for this.
fix(form-core): create fieldMeta for fields returned by async form va…
fix: create fieldMeta on async validation for fields with errors (Tan…