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

Add new tag "structonly" #18

Closed
deankarn opened this issue Mar 21, 2015 · 0 comments
Closed

Add new tag "structonly" #18

deankarn opened this issue Mar 21, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@deankarn
Copy link
Contributor

a flag is needed to identify that validation should run for a struct i.e. struct is required but not validate it's containing fields.

example:
type Inner struct{
Test string validate:"len=5"
}

type Outer struct{
InnerStruct Inner validate:"required,structonly"
}

in the above example InnerStruct will validate on the required, but Inner's Test field will not be validated.

@deankarn deankarn added the new label Mar 21, 2015
@deankarn deankarn self-assigned this Mar 21, 2015
@deankarn deankarn added this to the V3 Updates milestone Mar 21, 2015
deankarn pushed a commit that referenced this issue Mar 21, 2015
add “structonly” tag for struct only and not field validation
deankarn added a commit that referenced this issue Mar 21, 2015
CodeLingoBot pushed a commit to CodeLingoBot/go-playground-validator that referenced this issue Apr 3, 2019
fairyhunter13 added a commit to fairyhunter13/validator that referenced this issue Jul 12, 2020
add “structonly” tag for struct only and not field validation
fairyhunter13 added a commit to fairyhunter13/validator that referenced this issue Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant