I have the following rule:
birthday: !/^\d{2}\/\d{2}\/\d{4}$/.test(
new Date(values.birthday).toLocaleDateString('en-US')
)
? 'Birthday must be in the format MM/DD/YYYY'
: null,
For a standard DateInput (I am not extending the custom parser with dayjs). However that validation rule does not work, why? How do you properly check the input is a correct DateValue?