updated valid_date() in validator