You can do this two ways:
Option 1 is to do the actual work. Is the input correct? Does the month entered actually have at least as many days as the day input (taking leap years into account)?
Or option 2: cheat by using the builtin functions to convert your input to a datetime scalar, and extract the year,month,day numbers from that. If those match the input, your date is valid. You should still put in a check if the inputs are positive scalars.