Comments (4)
The problem here stems from the fact that your model is invalid until a full number is entered. What's weird is that the first 4 digits are being recorded to the model (4444) but then the next 4 results in the model being ''
(empty string). The latter is the expected behavior that should be happening the whole time.
You're going to need to use ngModelOptions
and its allowInvalid
method to implement this. The weird behavior is a bug, but the fix will be ensuring that the model is always undefined, even w/ cc-format. That won't help you.
from angular-credit-cards.
+1 - Mine ends before I can enter the last number: 4242 4242 4242 4242 424
input.form-control(type='text', ng-model="card.number", cc-format, cc-number, placeholder="4242 4242 4242 4242 4242" required)
from angular-credit-cards.
You've got 19 digits typed out -- that's the maximum. Don't think that's a bug.
from angular-credit-cards.
Just implemented a fix. If you want users to be able to type on the keyboard and use your UI keypad you'll need to use the allowInvalid
model option.
from angular-credit-cards.
Related Issues (20)
- Test card numbers showing wrong card type HOT 1
- Is there an exmample of cc-format markup? HOT 3
- cc-exp-month and cc-exp-year set incorrect validity keys HOT 6
- NgModel value is not updated HOT 1
- How can I use this in Angular4? HOT 1
- cc-number validation message when field is required HOT 2
- cc-exp and required message HOT 2
- [FIX] Temporary fix for ngRequired directive case HOT 3
- ng-model-options ignored? HOT 1
- Issue - CC input in google chrome Android Mobile HOT 3
- Problem with validating DISCOVER cards HOT 1
- Angular import overwrites angular global with webpack HOT 3
- Transposes numbers while typing HOT 5
- Angular 4? HOT 2
- Discover card is interpreted as Maestro HOT 1
- Wanna parse exp month as string. how?! HOT 1
- Transposed Numbers HOT 2
- Action required: Greenkeeper could not be activated 🚨
- Test Card Number 6011 1111 1111 1117 Incorrectly Identified HOT 2
- Can this work with angular > 1.7 HOT 2
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 angular-credit-cards.