jaredpalmer / formik

Build forms in React, without the tears 😭
https://formik.org
Apache License 2.0
34.02k stars 2.79k forks source link

YUP Default values do not work with schema validation #3117

Open kombuchafox opened 3 years ago

kombuchafox commented 3 years ago

Bug report

Current Behavior

Given a YUP Schema that has default values / required values, empty fields are not marked errored / invalid onBlur. These fields are marked errored if there is no default value

Expected behavior

Mark a field that has become empty as invalid or errored

Reproducible example

https://codesandbox.io/s/default-yup-values-bug-okj09?file=/index.js

Suggested solution(s)

Additional context

Your environment

Software Version(s)
Formik 2.2.6
React 16.13
TypeScript
Browser
npm/Yarn
Operating System
github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days

kombuchafox commented 3 years ago

any update here?

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days