I have separate input fields for month, day, and year. The current date regex does not account for leap years. I tried adding other regex to account for leap years but had no success. Your help is greatly appreciated.
var bmonth = Apperyio('register_birthdaymonth').val(); 
var bday = Apperyio('register_birthdayday').val(); 
var byear = Apperyio('register_birthdayyear').val(); 
var dateString = (bmonth + "/" + bday + "/" + byear)
var date_regex = /^(?:(0[1-9]|1[012])[\/.](0[1-9]|[12][0-9]|3[01])[\/.](18|19|20)[0-9]{2})$/;
if (!(date_regex.test(dateString)))
{   
    errorMsg = errorMsg + "1";
    document.getElementById("bdayError").innerHTML = "Please enter your birthday.";
}
 
     
    