You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -360,6 +360,19 @@ const { control } = useForm();
360
360
```
361
361
</details>
362
362
363
+
<details>
364
+
<summary>Paste-transformers</summary>
365
+
If you want to allow pasting of "XXX-XXX" even though the input's regex/pattern doesn't allow hyphen and its max length is 6, you can use the `pasteTransformer` prop.
366
+
367
+
```tsx
368
+
<OTPInput
369
+
// Transform the pasted text to parse hyphens but remove hyphens,
370
+
// so it fits into the input's pattern and max length.
0 commit comments