-
My use case:
in validators I use repositories and services, the simplest example of such validator "email already exists". This validator goes to check email in db/redis/whatever through repository…
-
### 小白一枚,想在Model 里面实现个Save方法,然后包含Model的struct都可以直接使用Save(),减少一些重复性的代码,谢谢
```
package main
import (
"fmt"
"github.com/go-ozzo/ozzo-dbx"
_ "github.com/go-sql-driver/mysql"
)
var (
db, e…
-
Considering the following type:
```go
type Foo struct {
OptionalBar *string
}
```
Would it be possible to validate OptionalBar only if it's not nil?
-
I'd like to implement a partial update in my API. I can already pass in a list of struct field names to ozzo-dbx's [ModelQuery.Update](http://godoc.org/github.com/go-ozzo/ozzo-dbx#ModelQuery.Update) m…
-
If you do this:
```
err := db.Select().Model(id, &model)
```
db's `FieldMapper` is not passed down to `SelectQuery`, so if the primary key has a different name in the database, it will fail.
-
In the following code, the slash remover works as expected when I do a GET request against /api/users/
```go
package main
import (
"net/http"
"github.com/go-ozzo/ozzo-routing"
"github.c…
-
-
Content of svPtr.nameMap not shown in debugger variables...
``` go
package main
import (
"fmt"
)
type (
structInfo struct {
nameMap map[string]*fieldInfo // mapping from struct fi…
-
I think you inherited this from `govalidator` package.
adred updated
7 years ago
-
When using `ValidateStruct` on a struct that has a field using a pointer to any field that contains a zero value, the validation panics.
```go
package main
import validation "github.com/go-ozzo…