- Update
credit-card-type
to v7.0.0
Breaking Changes
- Mastercard enum changed from
master-card
tomastercard
- Support custom card brands
- Require minimum version of credit-card-type to be v6.2.0
- Allow
maxElapsedYear
to be configurable inexpirationYear
andexpirationDate
(thanks @wozaki)
- Update
credit-card-type
to v6.0.0
- Add options object for postal code validation to specify min length
- Breaking change: Remove
dist
files. You must usenpm
to use this module - Breaking change: Remove support for primitive constructors like
new String()
- Fix postal code validation to be valid if 3 or more characters
- correctly identify Maestro cards beginning with
6
- Breaking change: The format of the
card
object returned has changed.pattern
has been replaced byprefixPattern
andexactPattern
.
- valid.expirationDate can take an object with month and year fields or a string value
- Update
dist
to include version4.0.3
of credit-card-type
- Including
dist
from2.2.6
- Fixes cases where card numbers were incorrectly reported as
isPotentiallyValid: false
when more digits could still be entered- issue #20 and PR #21
- Fixes expiration date results when year is current year and month is invalid
- Update files in
dist/
- Readme clarifications
- Fixes validation of space separated expiration dates
- Fixes potential validity of slashless expiration dates
- Fixes validation of expiration dates that are too long
- Fixes CVV validation to not always validate 3-digit values as
isValid: true
- Fixes 3-digit expiration date handling, such as 220 being Feb, 2020
- Use one Lodash dependency
- CVV validator can accept an array of possible length values
- Contextually validate month based on current date.
- Update
credit-card-type
to 4.0.0
- The npm module now includes built files under
dist/
.
- The returned value for
card.length
is now anArray
and calledcard.lengths
to account for variable-length cards such as UnionPay.
- Initial release