Added valid_visa_format() and fixed some other function errors