Answers for "formik yup nested object"

0

formik yup nested object

validationSchema={Yup.object().shape({
    email: Yup.number(),
    social: Yup.object().shape({
      facebook: Yup.number()
                   .transform((value, originalValue) => originalValue.trim() === "" ? null: value)
                   .nullable()
    })
})}
Posted by: Guest on October-18-2021

Browse Popular Code Answers by Language