2022-08-09 10:16:13 +00:00
|
|
|
# Input Validation
|
|
|
|
|
|
|
|
**`Advertise IP`**
|
2022-08-10 15:04:40 +00:00
|
|
|
|
|
|
|
Accepts:
|
|
|
|
|
2022-08-11 08:13:06 +00:00
|
|
|
- Empty string
|
2022-08-10 15:04:40 +00:00
|
|
|
- `http://` or `https://`
|
|
|
|
- IP or DNS host
|
2022-08-12 09:45:46 +00:00
|
|
|
- Characters (`0-9`, `a-z`, `A-Z`, `-`, `.`)
|
2022-08-10 15:04:40 +00:00
|
|
|
- Port is optional
|
|
|
|
- `,` Separated
|
|
|
|
|
2022-08-09 10:16:13 +00:00
|
|
|
Accepted formats are:
|
|
|
|
|
|
|
|
- `https://192.168.1.100:32400`
|
|
|
|
- `https://192.168.1.100:32400`
|
2022-08-10 15:04:40 +00:00
|
|
|
- `http://dnshost:32400`
|
|
|
|
- `https://dnshost:32400`
|
|
|
|
- `https://dnshost`
|
2022-08-12 09:45:46 +00:00
|
|
|
- `https://DNSHOST`
|
|
|
|
- `https://DNS-HOST`
|
|
|
|
- `https://dns-host`
|
2022-08-10 15:04:40 +00:00
|
|
|
- `https://dnshost,http://192.168.1.100:32400`
|
2022-08-09 10:16:13 +00:00
|
|
|
|
2022-08-12 09:45:46 +00:00
|
|
|
Regex used to match this: `^$|^(http(s)?:\/\/([a-zA-Z0-9.-]*)(:\d{0,5})?,?)*$`
|
|
|
|
You can try live [here](https://regex101.com/r/zay2xO/1)
|
2022-08-09 10:16:13 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
_If you find a field that you think it needs validation, please open an issue on github_
|