Skip to content
New issue

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

Complete the read.me #298

Merged
merged 2 commits into from
Apr 24, 2019
Merged

Conversation

okisetiawan0101
Copy link

  1. Complete Validators with parameters Section
"stringlength(min|max)": StringLength,
"rsapub(keylength)" : IsRsaPub,
  1. Add Example to create custom tags with parameter in example section
// Add your own struct validation tags with parameter
govalidator.ParamTagMap["animal"] = govalidator.ParamValidator(func(str string, params ...string) bool {
    species := params[0]
    return str == species
})
govalidator.ParamTagRegexMap["animal"] = regexp.MustCompile("^animal\\((\\w+)\\)$")

@asaskevich asaskevich merged commit f61b66f into asaskevich:master Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants