I need to display value of one field(effDt) in another field(endDt) error message as mentioned in below code. Can anyone please help with solution?
export const ValidationSchema = () => {
return Yup.object({
nm: Yup.string().required(Error.EMPTY_FIELD),
effDt: Yup.date().required(Error.EMPTY_FIELD),
endDt: Yup.date()
.typeError('End Date is required')
.required(Error.EMPTY_FIELD)
.min(Yup.ref('effDt'), `Value must be ${Yup.ref('effDt')} or later.`),// effDt value is not displayed
});