We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ab5905 + 7f798c2 commit 11bdb77Copy full SHA for 11bdb77
src/index.tsx
@@ -144,7 +144,7 @@ const ReactInputVerificationCode = ({
144
const pastedString = e.clipboardData?.getData('text');
145
if (!pastedString) return;
146
147
- const isNumber = !Number.isNaN(+pastedString);
+ const isNumber = /^\d+$/.test(pastedString);
148
if (isNumber) setValue(pastedString.split('').slice(0, length));
149
};
150
0 commit comments