Answers for "yup allow empty date"

0

yup allow empty date

const schema = Yup.date()
  .nullable()
  .transform((curr, orig) => orig === '' ? null : curr)
  .required('Mandatory field message')
Posted by: Guest on April-20-2021

Browse Popular Code Answers by Language