yup custom message to type error code example
Example: yup custom message to type error
const schema = Yup.object().shape({
valid_since: Yup.date().typeError('Incorrect date'),
});
const schema = Yup.object().shape({
valid_since: Yup.date().typeError('Incorrect date'),
});