Skip to content

Commit

Permalink
Merge pull request #46 from benjaminbear/fix_domain_validation
Browse files Browse the repository at this point in the history
Use fqdn validator for domain name
  • Loading branch information
benjaminbear authored May 27, 2024
2 parents 09abef8 + bb154d5 commit 6cc20a6
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 6cc20a6

Please sign in to comment.