Skip to content

Conversation

@Crocmagnon
Copy link
Contributor

Fixes Or Enhances

Mention 'enum' in the documentation for oneof. One of our team member spent too much time looking for an 'enum-like' validation tag, only to find out later that oneof exists. This PR intends on making the discovery of this validation tag easier.

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

@Crocmagnon Crocmagnon requested a review from a team as a code owner November 5, 2024 15:33
@Crocmagnon
Copy link
Contributor Author

Crocmagnon commented Nov 5, 2024

Of course I'm open to changing the wording, I'd just like to mention either "enum" or "enumeration" in here to ease discovery.

To add it more smoothly, maybe something like:
"oneof will ensure that the value is one of the values enumerated in the parameter"

@coveralls
Copy link

Coverage Status

coverage: 74.292%. remained the same
when pulling 97cd405 on Crocmagnon:doc/oneof-enum
into f1939ee on go-playground:master.

@deankarn deankarn merged commit 078d0c0 into go-playground:master Nov 16, 2024
15 checks passed
@Crocmagnon Crocmagnon deleted the doc/oneof-enum branch November 16, 2024 17:29
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