Skip to content

Commit 078d0c0

Browse files
authored
doc(oneof): mention 'enum' (#1326)
## 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:** - [x] Tests exist or have been written that cover this particular change. @go-playground/validator-maintainers
1 parent 51697fb commit 078d0c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ For strings, ints, and uints, oneof will ensure that the value
489489
is one of the values in the parameter. The parameter should be
490490
a list of values separated by whitespace. Values may be
491491
strings or numbers. To match strings with spaces in them, include
492-
the target string between single quotes.
492+
the target string between single quotes. Kind of like an 'enum'.
493493
494494
Usage: oneof=red green
495495
oneof='red green' 'blue yellow'

0 commit comments

Comments
 (0)