[GitHub] [trafficcontrol] mhoppa commented on a change in pull request #4082: Fix federation user validation

2019-11-05 Thread GitBox
mhoppa commented on a change in pull request #4082: Fix federation user 
validation
URL: https://github.com/apache/trafficcontrol/pull/4082#discussion_r342736383
 
 

 ##
 File path: lib/go-tc/federation.go
 ##
 @@ -184,7 +186,9 @@ type FederationUserPost struct {
 
 // Validate validates FederationUserPost
 func (f *FederationUserPost) Validate(tx *sql.Tx) error {
-   return nil
+   return validation.ValidateStruct(f,
+   validation.Field(, validation.NotNil),
 
 Review comment:
   Perl did check if userIDs is defined and an array 
https://github.com/apache/trafficcontrol/blob/master/traffic_ops/app/lib/API/FederationUser.pm#L61


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [trafficcontrol] mhoppa commented on a change in pull request #4082: Fix federation user validation

2019-11-05 Thread GitBox
mhoppa commented on a change in pull request #4082: Fix federation user 
validation
URL: https://github.com/apache/trafficcontrol/pull/4082#discussion_r342704855
 
 

 ##
 File path: lib/go-tc/federation.go
 ##
 @@ -184,7 +186,9 @@ type FederationUserPost struct {
 
 // Validate validates FederationUserPost
 func (f *FederationUserPost) Validate(tx *sql.Tx) error {
-   return nil
+   return validation.ValidateStruct(f,
+   validation.Field(, validation.NotNil),
 
 Review comment:
   no as the perl implementation didnt -> think I should add that in there?


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:
us...@infra.apache.org


With regards,
Apache Git Services