Skip to content

Commit

Permalink
simplify the note para
Browse files Browse the repository at this point in the history
Co-authored-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
AgniveshChaubey and jviotti authored Feb 5, 2024
1 parent 8cd1aa8 commit 237161e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/2020-12/validation/enum.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ related:

The `enum` keyword specifies a validation constraint for an instance, defining a set of permissible values. The value of the `enum` keyword must be an array containing at least one element, and these elements should be unique. The validation succeeds if the value of the instance matches one of the elements in the `enum` array.

_**Note:** When using `enum`, it's recommended not to include `type` as it is redundant. While it's not mandatory to exclude `type` with `enum`, combining `enum` and `type` is considered an anti-pattern, so it's better to avoid doing so._
_**Note:** Using the `type` keyword along the `enum` keyword is considered an anti-pattern, as `enum` constraints instances tighter than `type`._

## Examples

Expand Down

0 comments on commit 237161e

Please sign in to comment.