I recommend that you do not validate the date with the regex. Instead check only for the correct format:
That matches 6 arbitrary digits, a dash, then a digit from
2, then 4 more arbitrary digits. Afterwards you will find the date part in capturing group number
1, which you can check for a valid date. Alternatively you could extract days, months, years separately:
Now the days are in capture
1, the months in capture
2, the years in capture
3. The validation of the date ranges could in theory be done with the regex but it really not recommended (the regex becomes really bloated and unmaintainable). That is why you should just check that there are digits, and then you can use your programming language (PHP or JS) to check that the given numbers form a valid date.