Open pgjones opened 1 year ago
The yup documentation states
The default cast logic of date is pass the value to the Date constructor, failing that, it will attempt to parse the date as an ISO date string.
which wasn't true and would manifest for timestamps i.e.
const schema = yup.date(); schema.validateSync(1411500325000) // Failed to validate
as the cast logic would try Date.parse(1411500325000) which would return an invalid date.
The yup documentation states
which wasn't true and would manifest for timestamps i.e.
as the cast logic would try Date.parse(1411500325000) which would return an invalid date.