made isValid port greater or equal to and less than or equal to