Skip to content

Commit

Permalink
Use fqdn validator for domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminbear committed May 27, 2024
1 parent 09abef8 commit bb154d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dyndns/model/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit bb154d5

Please sign in to comment.