-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can we restrict strings and allow only numbers to be feed as otp? #310
Comments
Hello, Any update on this? |
I need to do this as well. Anyone has a solution? |
I created patch for this. It will works for everyone just follow below code and patch that library. diff --git a/node_modules/react-native-otp-inputs/src/OtpInput.tsx b/node_modules/react-native-otp-inputs/src/OtpInput.tsx
diff --git a/node_modules/react-native-otp-inputs/src/index.tsx b/node_modules/react-native-otp-inputs/src/index.tsx
@@ -128,7 +130,7 @@ const OtpInputs = forwardRef<OtpInputsRef, Props>(
@@ -160,9 +162,9 @@ const OtpInputs = forwardRef<OtpInputsRef, Props>(
|
I want to use only input type number only, I set keyboardType="phone-pad" but it is taking string from clipboard when copied.
The text was updated successfully, but these errors were encountered: