qor / validations

Validations is a GORM extension, used to validate models when creating, updating
MIT License
134 stars 43 forks source link

panic: interface conversion: error is govalidator.Errors, not govalidator.Error #4

Open gregwebs opened 5 years ago

gregwebs commented 5 years ago

Latest master has this issue:

panic: interface conversion: error is govalidator.Errors, not govalidator.Error

goroutine 1 [running]:
github.com/qor/validations.flatValidatorErrors(0xc420025cc0, 0x3, 0x4, 0x753640, 0xc42000be00, 0xc4204afd00)
    github.com/qor/validations/callbacks.go:42 +0x586
github.com/qor/validations.validate(0xc42027f700)
    github.com/qor/validations/callbacks.go:24 +0x1c9
github.com/jinzhu/gorm.(*Scope).callCallbacks(0xc42027f700, 0xc420199780, 0xa, 0x10, 0x525a7f)
    github.com/jinzhu/gorm/scope.go:798 +0x55
github.com/jinzhu/gorm.(*DB).Create(0xc420277040, 0x6daa40, 0xc4205742a0, 0xc4205742a0)
    github.com/jinzhu/gorm/main.go:372 +0x86