Skip to content

Feat: add tag to skip namespace in embedded structures #1426

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arxeiss
Copy link

@arxeiss arxeiss commented May 7, 2025

Enhances

Introducing new skipns validate tag, that allows to skip the name of embedded struct, when printing invalid field namspace.

type Outer struct {
	Embedded `validate:"skipns"`
}

See #1413 for more extensive examples and discussion.

Make sure that you've checked the boxes below before you submit PR:

  • Tests exist or have been written that cover this particular change.

@go-playground/validator-maintainers

Fixing #1413 and #776

@arxeiss arxeiss requested a review from a team as a code owner May 7, 2025 13:51
@coveralls
Copy link

Coverage Status

coverage: 73.672% (+0.02%) from 73.655%
when pulling f881394 on arxeiss:master
into 20f7df6 on go-playground:master.

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