Comments (4)
Hi @artoymsd ,
That's a good question. The current version doesn't support the border color when in error state. I would be happy to modify the existing capability to provide you the needed support. Probably in a day or two. Let me know if you have any more queries.
Thank, Varun
from vpmotpview.
Hello, @varunpm1
Looking forward to your commit. Thank you for your help!
Artem
from vpmotpview.
Hi @artoymsd
I have now added the support for error color for OTP field when invalid OTP is entered.
otpFieldErrorBorderColor
variable now tends to your requirement. It's an optional variable used to set the border when an error state is encountered.
You can pass true or false in the following delegate to indicate a valid or invalid OTP -
func hasEnteredAllOTP(hasEntered: Bool) -> Bool
Let me know if you need anything else. Closing the issue.
Thanks, Varun
from vpmotpview.
@varunpm1 This implementation for invalid entry appearance seems like is not working (or broke).
Running this code otpField?.layer.borderColor = (otpFieldErrorBorderColor ?? otpFieldEnteredBorderColor).cgColor
doesn't change the colour of the border (I am using .underlinedBottom for your reference).
Changing the code to below, it does the trick
otpField?.shapeLayer.strokeColor = (otpFieldErrorBorderColor ?? otpFieldEnteredBorderColor).cgColor
from vpmotpview.
Related Issues (13)
- Backspace bug - Deleting is not worked correctly. HOT 2
- Clear OTP Text Field HOT 2
- support for oneTimeCode HOT 2
- Bug: Every time keyboard restarting!
- Cannot override with a stored property 'borderWidth' HOT 1
- Auto fill VPMOTPView with the received OTP from Messages
- i need forcus auto on first circle and show keyboard HOT 4
- Can't able to use it with auto layout programmatically. HOT 1
- Backspace doesn't work util all textFields will be filled HOT 2
- Not clear all text HOT 9
- How to use bullets? HOT 7
- Move textField HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vpmotpview.