]> git.proxmox.com Git - pve-installer.git/commit
tui: fix FQDN validation
authorChristoph Heiss <c.heiss@proxmox.com>
Wed, 19 Jul 2023 16:31:30 +0000 (18:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 21 Jul 2023 11:45:10 +0000 (13:45 +0200)
commit55dc67ca392e13da30886f4bffd1f0e19d911f33
tree7433bc3ad37d311fea7cb8e783bf7e4f4e86b460
parent8c9af1e7a3d94082a2854ab55ae23c8d082d412a
tui: fix FQDN validation

Add checks to ensure that:
 * It is actually has a hostname, not just a domain name
 * Properly check if the hostname is purely numeric, which was
   broken/different to how the GUI installer does it

The custom error type also allows for easier future adaptions, as the
changes can be entirely contained to the `Fqdn` type.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
proxmox-tui-installer/src/main.rs
proxmox-tui-installer/src/utils.rs