def validate_port(port):
     """Port number format validator
     
     return validated port number as string or False if not valid
     """
     if not port:
         return False
     port = port.strip()
     if port.isdigit() and int(port) > 0 and int(port) < 65536:
         return port
     return False