rawlinp commented on a change in pull request #4107:
URL: https://github.com/apache/trafficcontrol/pull/4107#discussion_r432075847



##########
File path: traffic_ops/traffic_ops_golang/staticdnsentry/staticdnsentry.go
##########
@@ -106,7 +107,7 @@ func (staticDNSEntry TOStaticDNSEntry) Validate() error {
        }
 
        errs := validation.Errors{
-               "host":              validation.Validate(staticDNSEntry.Host, 
validation.Required, is.DNSName),
+               "host":              validation.Validate(staticDNSEntry.Host, 
validation.Required, 
validation.Match(regexp.MustCompile(`^([a-zA-Z0-9_@*]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$`))),

Review comment:
       ☝️ +1, playing around w/ that regex in https://regex101.com/ it appears 
to be correct.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to