﻿# port

> Validate port values

[Types](/docs/dotenv-toml/type/)

An integer from `0` through `65535`.

```toml
[env.PORT]
type = "port"
```

Validation leaves the value as a string. Storage defaults to `"any"` and redaction is off. Set `storage = "encrypted"` and `redacted = true` for secrets.

Use [`min`](/docs/dotenv-toml/min/) and [`max`](/docs/dotenv-toml/max/) to narrow the allowed range.

## Related

- [Dotenv.toml Quickstart](/docs/dotenv-toml/quickstart/)
- [Full Dotenv.toml Spec](/docs/dotenv-toml/spec/)
