You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/07/24 14:58:12 UTC
[GitHub] dewrich commented on a change in pull request #2576: Fixes missing
staticdns query parameters
dewrich commented on a change in pull request #2576: Fixes missing staticdns query parameters
URL: https://github.com/apache/trafficcontrol/pull/2576#discussion_r204790691
##########
File path: traffic_ops/traffic_ops_golang/staticdnsentry/staticdnsentry.go
##########
@@ -81,8 +82,8 @@ func (staticDNSEntry *TOStaticDNSEntry) SetKeys(keys map[string]interface{}) {
// Validate fulfills the api.Validator interface
func (staticDNSEntry TOStaticDNSEntry) Validate() error {
errs := validation.Errors{
- "host": validation.Validate(staticDNSEntry.Host, validation.Required),
- "address": validation.Validate(staticDNSEntry.Address, validation.Required),
+ "host": validation.Validate(staticDNSEntry.Host, validation.Required, is.DNSName),
+ "address": validation.Validate(staticDNSEntry.Address, validation.Required, is.Host),
Review comment:
@rawlinp So you are centralizing *all* type validation? If that's the case then sure and just let me know and I'll refer to it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services