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
The object fieldErrors: Partial<Record<keyof Values, NonEmptyArray<FieldError>>> returned by useFormo is not properly cleaned up after each submit of the form: if it contained a key foo with some validation error after such error is resolved the key is not removed from the object, instead, its value is set to undefined.
As a consequence using Object.keys(fieldErrors).length > 0 to detect if there is any validation error gives false positives.
The text was updated successfully, but these errors were encountered:
The object
fieldErrors: Partial<Record<keyof Values, NonEmptyArray<FieldError>>>
returned byuseFormo
is not properly cleaned up after each submit of the form: if it contained a keyfoo
with some validation error after such error is resolved the key is not removed from the object, instead, its value is set toundefined
.As a consequence using
Object.keys(fieldErrors).length > 0
to detect if there is any validation error gives false positives.The text was updated successfully, but these errors were encountered: