Fixes integration with "go-validate-yourself"
http://stackoverflow.com/questions/29138591/hiding-nil-values-understanding-why-golang-fails-here
This commit is contained in:
+4
-1
@@ -20,5 +20,8 @@ func (_ xmlBinding) Bind(req *http.Request, obj interface{}) error {
|
||||
if err := decoder.Decode(obj); err != nil {
|
||||
return err
|
||||
}
|
||||
return _validator.ValidateStruct(obj)
|
||||
if err := _validator.ValidateStruct(obj); err != nil {
|
||||
return error(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user