date of birth validation in yup

Solutions on MaxInterview for date of birth validation in yup by the best coders in the world

showing results for - "date of birth validation in yup"
Maria
03 Jan 2020
1Yup.string()
2      .required("DOB is Required")
3      .test("DOB", "Please choose a valid date of birth", (value) => {
4        return moment().diff(moment(value), "years") >= 10;
5      }),
similar questions
queries leading to this page
date of birth validation in yup