modification to valid_passport_format and valid_visa_code_format function as stated on the announcements