Skip to content

Commit 523a82c

Browse files
authored
Merge pull request #27 from devn1x/issue-address-validation-ipv6
Fix form validation for IPv6 addresses
2 parents f650124 + 813491f commit 523a82c

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
@@ -11,7 +11,7 @@ type Host struct {
1111
gorm.Model
1212
Hostname string `gorm:"unique_index:idx_host_domain;not null" form:"hostname" validate:"required,hostname"`
1313
Domain string `gorm:"unique_index:idx_host_domain;not null" form:"domain" validate:"required,hostname"`
14-
Ip string `form:"ip" validate:"omitempty,ipv4"`
14+
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"`
1717
UserName string `gorm:"unique" form:"username" validate:"min=3"`

0 commit comments

Comments
 (0)