I have a question, on how to validate IP:Port together. example:
192.158.2.10:80 <--Valid
192.158.2.10 <---Invalid
So the port is a must, I fo
You can simply use the Regex below to validate IP:Port only
Valid IP Address (0.0.0.0 - 255.255.255.255): Valid port (1-65535)
/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9][0-9]|6[0-4][0-9][0-9][0-9][0-9]|[1-5](\d){4}|[1-9](\d){0,3})$/