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

RegisterTagNameFunc doc update #1128

Closed
wants to merge 1 commit into from
Closed

RegisterTagNameFunc doc update #1128

wants to merge 1 commit into from

Conversation

teathedev
Copy link

@teathedev teathedev commented Jul 20, 2023

Fixes Or Enhances

RegisterTagNameFunc document was misleading. I updated the description to be more clear.
It doesn't affect the strings return from StructField so I added where it affect.

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

@teathedev teathedev requested a review from a team as a code owner July 20, 2023 14:30
@coveralls
Copy link

Coverage Status

coverage: 73.972%. remained the same when pulling 4a66afc on teathedev:master into bd1113d on go-playground:master.

@@ -190,7 +190,7 @@ func (v *Validate) ValidateMap(data map[string]interface{}, rules map[string]int
return v.ValidateMapCtx(context.Background(), data, rules)
}

// RegisterTagNameFunc registers a function to get alternate names for StructFields.
// RegisterTagNameFunc registers a function to get alternate names (other than sturct field names) from FieldName.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is 100% correct either as if does not get them from FieldName but the reflect.StructField; perhaps it's still not specific enough?

@teathedev teathedev closed this by deleting the head repository Oct 5, 2023
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.

3 participants