Move CVV fieldnames to CC constants
This commit is contained in:
parent
bb294ac792
commit
7e5b50a6cb
|
@ -411,9 +411,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||
fillFields.expYear = f;
|
||||
break;
|
||||
} else if (!fillFields.code && this.isFieldMatch(f[attr],
|
||||
['cvv', 'cvc', 'cvv2', 'cc-csc', 'cc-cvv', 'card-csc', 'card-cvv', 'cvd', 'cid', 'cvc2',
|
||||
'cnv', 'cvn2', 'cc-code', 'card-code', 'code-securite', 'security-code', 'crypto',
|
||||
'card-verif', 'verification-code', 'csc', 'ccv'])) {
|
||||
CreditCardAutoFillConstants.CVVFieldNames)) {
|
||||
fillFields.code = f;
|
||||
break;
|
||||
} else if (!fillFields.brand && this.isFieldMatch(f[attr],
|
||||
|
|
|
@ -138,6 +138,30 @@ export class CreditCardAutoFillConstants {
|
|||
"date-y",
|
||||
];
|
||||
|
||||
static readonly CVVFieldNames: string[] = [
|
||||
"cvv",
|
||||
"cvc",
|
||||
"cvv2",
|
||||
"cc-csc",
|
||||
"cc-cvv",
|
||||
"card-csc",
|
||||
"card-cvv",
|
||||
"cvd",
|
||||
"cid",
|
||||
"cvc2",
|
||||
"cnv",
|
||||
"cvn2",
|
||||
"cc-code",
|
||||
"card-code",
|
||||
"code-securite",
|
||||
"security-code",
|
||||
"crypto",
|
||||
"card-verif",
|
||||
"verification-code",
|
||||
"csc",
|
||||
"ccv",
|
||||
];
|
||||
|
||||
// Each index represents a language. These three arrays should all be the same length.
|
||||
// 0: English, 1: Danish, 2: German/Dutch, 3: French/Spanish/Italian, 4: Russian, 5: Portuguese
|
||||
static readonly MonthAbbr = ["mm", "mm", "mm", "mm", "mm", "mm"];
|
||||
|
|
Loading…
Reference in New Issue