{"action":"created","issue":{"url":"https://api.github.com/repos/bluesuncorp/validator/issues/106","labels_url":"https://api.github.com/repos/bluesuncorp/validator/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/bluesuncorp/validator/issues/106/comments","events_url":"https://api.github.com/repos/bluesuncorp/validator/issues/106/events","html_url":"https://github.com/bluesuncorp/validator/issues/106","id":94005135,"number":106,"title":"Interface still makes validator panic","user":{"login":"manucorporat","id":127379,"avatar_url":"https://avatars.githubusercontent.com/u/127379?v=3","gravatar_id":"","url":"https://api.github.com/users/manucorporat","html_url":"https://github.com/manucorporat","followers_url":"https://api.github.com/users/manucorporat/followers","following_url":"https://api.github.com/users/manucorporat/following{/other_user}","gists_url":"https://api.github.com/users/manucorporat/gists{/gist_id}","starred_url":"https://api.github.com/users/manucorporat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manucorporat/subscriptions","organizations_url":"https://api.github.com/users/manucorporat/orgs","repos_url":"https://api.github.com/users/manucorporat/repos","events_url":"https://api.github.com/users/manucorporat/events{/privacy}","received_events_url":"https://api.github.com/users/manucorporat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-09T09:53:36Z","updated_at":"2015-07-09T16:55:31Z","closed_at":null,"body":"Validator still crashes when passing struct with interface{}.\r\n\r\n```\r\n2015/07/09 11:44:48 Panic recovery -> Invalid validation tag on field C\r\n/usr/local/Cellar/go/1.4.2/libexec/src/runtime/panic.go:387 (0x13ee8)\r\n\tgopanic: reflectcall(unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))\r\n/Users/manu/repos/go/src/gopkg.in/bluesuncorp/validator.v5/validator.go:686 (0x207ce8)\r\n\t(*Validate).fieldWithNameAndValue: panic(fmt.Sprintf(\"Invalid validation tag on field %s\", name))\r\n/Users/manu/repos/go/src/gopkg.in/bluesuncorp/validator.v5/validator.go:531 (0x204b51)\r\n\t(*Validate).structRecursive: if fieldError := v.fieldWithNameAndValue(top, current, valueField.Interface(), cField.tag, cField.name, false, nil); fieldError != nil {\r\n/Users/manu/repos/go/src/gopkg.in/bluesuncorp/validator.v5/validator.go:387 (0x203ac2)\r\n\t(*Validate).structRecursive: return v.structRecursive(top, current, structValue.Elem().Interface())\r\n/Users/manu/repos/go/src/gopkg.in/bluesuncorp/validator.v5/validator.go:378 (0x203910)\r\n\t(*Validate).Struct: return v.structRecursive(s, s, s)\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/binding/default_validator.go:20 (0xb6ca7)\r\n\t(*defaultValidator).ValidateStruct: if err := v.validate.Struct(obj); err != nil {\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/binding/binding.go:62 (0xb6bf9)\r\n\tvalidate: return Validator.ValidateStruct(obj)\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/binding/json.go:24 (0xb820e)\r\n\tjsonBinding.Bind: return validate(obj)\r\n<autogenerated>:6 (0xb8927)\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/context.go:270 (0x400c2)\r\n\t(*Context).BindWith: if err := b.Bind(c.Request, obj); err != nil {\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/context.go:259 (0x3ff7e)\r\n\t(*Context).Bind: return c.BindWith(obj, b)\r\n/Users/manu/test2/main.go:18 (0x2168)\r\n\tCreate: c.Bind(&a)\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/context.go:95 (0x3f2b0)\r\n\t(*Context).Next: c.handlers[c.index](c)\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/logger.go:56 (0x4f532)\r\n\tfunc.008: c.Next()\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/context.go:95 (0x3f2b0)\r\n\t(*Context).Next: c.handlers[c.index](c)\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/recovery.go:43 (0x4ff12)\r\n\tfunc.010: c.Next()\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/context.go:95 (0x3f2b0)\r\n\t(*Context).Next: c.handlers[c.index](c)\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/gin.go:292 (0x45493)\r\n\t(*Engine).handleHTTPRequest: context.Next()\r\n/Users/manu/repos/go/src/github.com/gin-gonic/gin/gin.go:273 (0x45167)\r\n\t(*Engine).ServeHTTP: engine.handleHTTPRequest(c)\r\n/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1703 (0x7e45a)\r\n\tserverHandler.ServeHTTP: handler.ServeHTTP(rw, req)\r\n/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1204 (0x7bcd7)\r\n\t(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)\r\n/usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:2232 (0x3e0b1)\r\n\tgoexit: \r\n```\r\n\r\ncode:\r\n\r\n```go\r\npackage main\r\n\r\nimport \"github.com/gin-gonic/gin\"\r\n\r\ntype MyStruct struct {\r\n\tA, B string\r\n\tC    interface{}\r\n}\r\n\r\nfunc main() {\r\n\trouter := gin.Default()\r\n\trouter.POST(\"/post\", Create)\r\n\trouter.Run(\":8080\")\r\n}\r\n\r\nfunc Create(c *gin.Context) {\r\n\tvar a MyStruct\r\n\tc.Bind(&a)\r\n\tc.JSON(200, gin.H{\r\n\t\t\"bind\": a,\r\n\t})\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/bluesuncorp/validator/issues/comments/120068238","html_url":"https://github.com/bluesuncorp/validator/issues/106#issuecomment-120068238","issue_url":"https://api.github.com/repos/bluesuncorp/validator/issues/106","id":120068238,"user":{"login":"joeybloggs","id":8068371,"avatar_url":"https://avatars.githubusercontent.com/u/8068371?v=3","gravatar_id":"","url":"https://api.github.com/users/joeybloggs","html_url":"https://github.com/joeybloggs","followers_url":"https://api.github.com/users/joeybloggs/followers","following_url":"https://api.github.com/users/joeybloggs/following{/other_user}","gists_url":"https://api.github.com/users/joeybloggs/gists{/gist_id}","starred_url":"https://api.github.com/users/joeybloggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeybloggs/subscriptions","organizations_url":"https://api.github.com/users/joeybloggs/orgs","repos_url":"https://api.github.com/users/joeybloggs/repos","events_url":"https://api.github.com/users/joeybloggs/events{/privacy}","received_events_url":"https://api.github.com/users/joeybloggs/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T16:55:31Z","updated_at":"2015-07-09T16:55:31Z","body":"I will take a look at this as tonight"}}