> 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/number/enum.md).

# enum

enum(...values)

## Effect

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

## Arguments

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

## Example

```javascript
const schema = racoon.number().enum(1, 3, 5);
schema.validate(1); // pass
schema.validate(3); // pass
schema.validate(5); // pass
schema.validate(2); // fail
```
