Validity detection

Detecting input,such as IP address,port number and site number.