Validating a Date Format with a Datepicker Field

I’ve done the error checking on the date, so it cant be after today, but its the fact that the datepicker itself is converting
555555
to a valid date, when its not.
But the datepicker is not returning 555555 its returning 5/4/2022, but it would be impossible to validate what the datepicker has converted it to, as it could be genuine. The only thing that can be validated on that is if the datepicker actually presented 555555 as the date, or 01/01 as the date, but it doesnt.