mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
Move cardExpiry containsOptions to CC constants
This commit is contained in:
@@ -393,8 +393,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
break;
|
break;
|
||||||
} else if (!fillFields.exp && this.isFieldMatch(f[attr],
|
} else if (!fillFields.exp && this.isFieldMatch(f[attr],
|
||||||
CreditCardAutoFillConstants.CardExpiryFieldNames,
|
CreditCardAutoFillConstants.CardExpiryFieldNames,
|
||||||
['mm-yy', 'mm-yyyy', 'yy-mm', 'yyyy-mm', 'expiration-date',
|
CreditCardAutoFillConstants.CardExpiryFieldNameValues)) {
|
||||||
'payment-card-expiration'])) {
|
|
||||||
fillFields.exp = f;
|
fillFields.exp = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.expMonth && this.isFieldMatch(f[attr],
|
} else if (!fillFields.expMonth && this.isFieldMatch(f[attr],
|
||||||
|
|||||||
@@ -124,6 +124,15 @@ export class CreditCardAutoFillConstants {
|
|||||||
"payment-cc-date",
|
"payment-cc-date",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
static readonly CardExpiryFieldNameValues: string[] = [
|
||||||
|
"mm-yy",
|
||||||
|
"mm-yyyy",
|
||||||
|
"yy-mm",
|
||||||
|
"yyyy-mm",
|
||||||
|
"expiration-date",
|
||||||
|
"payment-card-expiration",
|
||||||
|
];
|
||||||
|
|
||||||
static readonly ExpiryMonthFieldNames: string[] = [
|
static readonly ExpiryMonthFieldNames: string[] = [
|
||||||
"exp-month",
|
"exp-month",
|
||||||
"cc-exp-month",
|
"cc-exp-month",
|
||||||
|
|||||||
Reference in New Issue
Block a user