From 813491f73a46676ce0824ca2ee0bc93d5c28bc8e Mon Sep 17 00:00:00 2001 From: devn1x <16466128+devn1x@users.noreply.github.com> Date: Sun, 8 Jan 2023 01:00:24 +0100 Subject: [PATCH] Add ipv6 as acceptable format of ip address --- dyndns/model/host.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyndns/model/host.go b/dyndns/model/host.go index ea5e349..1f49bff 100644 --- a/dyndns/model/host.go +++ b/dyndns/model/host.go @@ -11,7 +11,7 @@ type Host struct { gorm.Model Hostname string `gorm:"unique_index:idx_host_domain;not null" form:"hostname" validate:"required,hostname"` Domain string `gorm:"unique_index:idx_host_domain;not null" form:"domain" validate:"required,hostname"` - Ip string `form:"ip" validate:"omitempty,ipv4"` + Ip string `form:"ip" validate:"omitempty,ipv4|ipv6"` Ttl int `form:"ttl" validate:"required,min=20,max=86400"` LastUpdate time.Time `form:"lastupdate"` UserName string `gorm:"unique" form:"username" validate:"min=3"`