Skip to content

Commit bb154d5

Browse files
committed
Use fqdn validator for domain name
1 parent 09abef8 commit bb154d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: dyndns/model/host.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
type Host struct {
1111
gorm.Model
1212
Hostname string `gorm:"unique_index:idx_host_domain;not null" form:"hostname" validate:"required,hostname"`
13-
Domain string `gorm:"unique_index:idx_host_domain;not null" form:"domain" validate:"required,hostname"`
13+
Domain string `gorm:"unique_index:idx_host_domain;not null" form:"domain" validate:"required,fqdn"`
1414
Ip string `form:"ip" validate:"omitempty,ipv4|ipv6"`
1515
Ttl int `form:"ttl" validate:"required,min=20,max=86400"`
1616
LastUpdate time.Time `form:"lastupdate"`

0 commit comments

Comments
 (0)