Last 12 weeks ยท 0 commits
4 of 6 standards met
๐ Bug report Current Behavior When a form field is an `{ value: string }{ value: string | number }NumberInputFormik Number InputNormal Number Input` as well. It looks like this behavior has been a part of Formik a long ways going back, so it would definitely be a breaking change. Your environment v1.3.2 v16.6.3 v3.1.6 Chrome Yarn 1.12.3 Mac OS X
I have some trouble getting my head around a breaking change introduces in Yup with version '0.29.0' in combination with Formik. Namely it's about the following: This change is rather simple and straightforward. For example, if you want to specify the following form values: is required, therefore always defined. is optional, but always defined with according to the above. But when you now submit such a form, you receive the following error from Yup: . After some research I found the following code in Formik, which changes empty string to which then fails of course in the validation. https://github.com/jaredpalmer/formik/blob/849ed497e24afbc1c9d41dbd0ad84db8231a48c2/packages/formik/src/Formik.tsx#L1108 Full working example here: https://codesandbox.io/s/great-surf-3x642?file=/src/App.tsx I suppose there is a good reason behind this line of code. But I'm not sure it is intended behaviour in combination with Yup. Should this be adapted on Formik side or on user-side and ideally be documented? formik v2.1.4 yup v0.29.1 @types/yup v0.29.3
Repository: jaredpalmer/formik. Description: Build forms in React, without the tears ๐ญ Stars: 34335, Forks: 2781. Primary language: TypeScript. Languages: TypeScript (94%), JavaScript (4%), CSS (1.9%), Shell (0%). License: Apache-2.0. Homepage: https://formik.org Topics: form, formik, forms, higher-order-component, hooks, react, react-hooks, react-native, render-props. Latest release: formik@2.4.9 (7mo ago). Open PRs: 100, open issues: 737. Last activity: 7mo ago. Community health: 100%. Top contributors: jaredpalmer, quantizor, github-actions[bot], maddhruv, snyk-bot, imgbot[bot], Andreyco, johnrom, prichodko, hmmChase and others.