func validate(scope *gorm.Scope) { if _, ok := scope.Get("gorm:update_column"); !ok { if result, ok := scope.DB().Get(skipValidations); !(ok && result.(bool)) { scope.CallMethodWithErrorCheck("Validate") } } }
func validate(scope *gorm.Scope) { db := scope.DB() if _, ok := db.Get(settingKey); !ok { db.InstantSet(settingKey, map[string][]string{}) } if result, ok := db.Get(skipValidations); !(ok && result.(bool)) { scope.CallMethodWithErrorCheck("Validate") } }