# normalizeOtp (@salmonui/inputs/otp-field)

> The normalizeOtp function of @salmonui/inputs/otp-field: Keeps the accepted characters, applies transform and cuts to length.

Canonical: https://salmonui.dev/docs/reference/inputs/otp-field/normalizeOtp

```ts
import { normalizeOtp } from '@salmonui/inputs/otp-field';
```

Entry index: https://salmonui.dev/docs/reference/inputs/otp-field (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/inputs/otp-field.md).

## Reference

Kind: function

```ts
function normalizeOtp(raw: string, length: number, type?: 'numeric' | 'alphanumeric' | 'text', transform?: 'uppercase' | 'lowercase' | 'none'): string;
```

Keeps the accepted characters, applies `transform` and cuts to `length`.
