created a function for validating birthdates
onReady function now includes all other event listeners and functions