monthValidate function modified