Skip to content

Commit 2cb818d

Browse files
committed
update readme
fix ordering of constants
1 parent 413ddb3 commit 2cb818d

File tree

2 files changed

+27
-28
lines changed

2 files changed

+27
-28
lines changed

CreditCardEntry/src/com/devmarvel/creditcardentry/internal/CreditCardUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public class CreditCardUtil {
2626
private static final String REGX_DISCOVER = "^6(?:011|5[0-9]{2})[0-9]{12}$"; // Discover 16
2727
private static final String REGX_DINERS_CLUB = "^3(?:0[0-5]|[68][0-9])[0-9]{11}$"; // DinersClub 14
2828

29-
private static final String REGX_AMEX_REG_TYPE = "^3[47][0-9]{2}$"; // AMEX 15
3029
private static final String REGX_VISA_TYPE = "^4[0-9]{3}?"; // VISA 16
3130
private static final String REGX_MC_TYPE = "^5[1-5][0-9]{2}$"; // MC 16
31+
private static final String REGX_AMEX_REG_TYPE = "^3[47][0-9]{2}$"; // AMEX 15
3232
private static final String REGX_DISCOVER_TYPE = "^6(?:011|5[0-9]{2})$"; // Discover 16
3333
private static final String REGX_DINERS_CLUB_TYPE = "^3(?:0[0-5]|[68][0-9])[0-9]$"; // DinersClub
3434

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,14 @@
11
CreditCardEntry
22
=========
33

4-
# Version History
5-
6-
###4/2/2013
7-
- Initial Commit
8-
9-
###5/11/2013
10-
- Updated Demo added screenshots
11-
12-
###4/7/2015
13-
- Made zip code optional (app:include_zip="false")
14-
- added callback when data entry is complete and card is valid
15-
- optionally specify helper text color in XML attrs
16-
17-
###4/8/2015
18-
- Always return CreditCard object when requested even when invalid
19-
20-
###4/18/2015
21-
- Made helper optional (app:include_helper="false")
22-
- Fixed a ton of lint warnings
23-
- Fixed vertical alignment of form fields
24-
- Fixed over excited animation scroll
25-
- Last 4 of card now tappable to enter edit mode
26-
- updated image assets
27-
284
# Introduction
295

306
This library provides an elegant form for credit card entry that can be easily added to a activity or fragment. Regex is used to validate credit card types and a Luhn check is performed on the card numbers. This form was inspired by the credit entry UI on Square.
317

32-
Smooth interface
33-
Identifies credit card type
34-
Hides number for privacy
8+
- Smooth interface
9+
- Identifies credit card type
10+
- Hides number for privacy
11+
- Supports VISA, MasterCard, Discover and AMEX
3512

3613
![][1]
3714

@@ -103,4 +80,26 @@ Please see below for an example. Delegate calls for valid entry and accessors fo
10380

10481
[1]: https://raw.github.com/zumper/CreditCardEntry/master/demo.gif "Demo GIF"
10582

83+
# Version History
84+
85+
###4/2/2013
86+
- Initial Commit
87+
88+
###5/11/2013
89+
- Updated Demo added screenshots
10690

91+
###4/7/2015
92+
- Made zip code optional (app:include_zip="false")
93+
- added callback when data entry is complete and card is valid
94+
- optionally specify helper text color in XML attrs
95+
96+
###4/8/2015
97+
- Always return CreditCard object when requested even when invalid
98+
99+
###4/18/2015
100+
- Made helper optional (app:include_helper="false")
101+
- Fixed a ton of lint warnings
102+
- Fixed vertical alignment of form fields
103+
- Fixed over excited animation scroll
104+
- Last 4 of card now tappable to enter edit mode
105+
- updated image assets

0 commit comments

Comments
 (0)