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
if the field is multiple required but not show all message only one message
for example
type User struct { Mobile string `gopass:"required|numeric|length:11"` // 手機 Password string `gopass:"required|length:6,16"` // 密碼demo.go Email string `gopass:"required|email"` // Email Sex string `gopass:"in:man,woman,other"` // sex } var u = User{ Mobile: "13800138000", Password: "123456", Email: "", Sex: "", } v := gopass.NewGov(&gopass.Option{DefaultLanguage: "en_us"}) err := v.ValidateStruct(&u) if err != nil { fmt.Println("get err:", err ) } else { fmt.Println("struct test pass") }
in this code only show one error
err: param Email needed
The text was updated successfully, but these errors were encountered:
@derit yeah, if detected one error , will be return directly
Sorry, something went wrong.
No branches or pull requests
if the field is multiple required but not show all message only one message
for example
in this code only show one error
The text was updated successfully, but these errors were encountered: