We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add validate to bast
such as:
type vv struct { A string `json:"a" v:"required|min:1"` B *string `json:"b" v:"required|min:1"` } g := "a" v := vv{A: "a", B: &g} v2 := []vv{{A: "b", B: &g}} v3 := map[string]vv{"c": vv{A: "c", B: &g}} vr := Validator{} err := vr.Struct(v) if err != nil { t.Error(err) } err = vr.Struct(v2) if err != nil { t.Error(err) } err = vr.Struct(v3) if err != nil { t.Error(err) }
v4 := url.Values{ "d": { "15", }, "e": { "eeeee", }, "f": { "ff", }, } vr := Validator{} err := vr.Request(v4, "d@required|int|min:12|max:16", "e@required|min:5") if err != nil { t.Error(err) }
The text was updated successfully, but these errors were encountered:
note:will continue to add new validator
Sorry, something went wrong.
axfor
No branches or pull requests
add validate to bast
support struct
josn etc...
support url.Values
*http.Request etc...
The text was updated successfully, but these errors were encountered: