validations icon indicating copy to clipboard operation
validations copied to clipboard

Validations is a GORM extension, used to validate models when creating, updating

Results 8 validations issues
Sort by recently updated
recently updated
newest added

Got this error when using: ```go import ( "gorm.io/gorm" "github.com/qor/validations" ) database, _ := gorm.Open(...) validations.RegisterCallbacks(database) ``` Err: ```console cannot use database (variable of type *"gorm.io/gorm".DB) as *"github.com/jinzhu/gorm".DB value in...

If a user has required fields, the statement: `db.Model(&User{}).Where("status = ?", "active").Update("status", "inactive")` returns validation errors because the update object is empty except for the status field.

To enable the use of this repo with go modules, please tag the releases with a semver-compatible syntax

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,...