I have nested fields with number inputs and can't get the validation to work properly. Not sure if this is a problem with formik or yup / how the validation schema is declared but I'll start asking here.
In the example I have two fields which represents numbers and defaults to empty string. The validation works for the first fields but I can not get it to behave the same for the nested field. When I touch the field but don't type anything it returns social.facebook must be a `number` type, but the final value was: `NaN` (cast from the value `""`).
I have nested fields with number inputs and can't get the validation to work properly. Not sure if this is a problem with formik or yup / how the validation schema is declared but I'll start asking here.
In the example I have two fields which represents numbers and defaults to empty string. The validation works for the first fields but I can not get it to behave the same for the nested field. When I touch the field but don't type anything it returns
social.facebook must be a `number` type, but the final value was: `NaN` (cast from the value `""`).
Example: https://codesandbox.io/s/formik-nested-schema-example-q4dlj?fontsize=14