From bb154d5385095b9975e8a359e4715cf370c2462c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4rthlein?= Date: Mon, 27 May 2024 23:56:34 +0200 Subject: [PATCH] Use fqdn validator for domain name --- 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 fcd32ef..9a1d3a6 100644 --- a/dyndns/model/host.go +++ b/dyndns/model/host.go @@ -10,7 +10,7 @@ import ( 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"` + Domain string `gorm:"unique_index:idx_host_domain;not null" form:"domain" validate:"required,fqdn"` Ip string `form:"ip" validate:"omitempty,ipv4|ipv6"` Ttl int `form:"ttl" validate:"required,min=20,max=86400"` LastUpdate time.Time `form:"lastupdate"`