Add validations on the port number

This adds validations that the port number is 5 or less digits and a number
between 1 and 65535.