> For the complete documentation index, see [llms.txt](https://racoon-js.gitbook.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://racoon-js.gitbook.io/en/api/any/enum.md).

# enum

enum(...values)

## Effect

Restrict the detected value to be one of `values`.

## Arguments

* `...values` ***(Array<\*>)*** - The valid values that allow the detected value to be.

## Example

```javascript
const schema = racoon.any().enum('a', 1, true);
schema.validate('a'); // pass
schema.validate(1); // pass
schema.validate(true); // pass
schema.validate('b'); // fail
```
