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;
|
fillFields.expYear = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.code && this.isFieldMatch(f[attr],
|
} else if (!fillFields.code && this.isFieldMatch(f[attr],
|
||||||
['cvv', 'cvc', 'cvv2', 'cc-csc', 'cc-cvv', 'card-csc', 'card-cvv', 'cvd', 'cid', 'cvc2',
|
CreditCardAutoFillConstants.CVVFieldNames)) {
|
||||||
'cnv', 'cvn2', 'cc-code', 'card-code', 'code-securite', 'security-code', 'crypto',
|
|
||||||
'card-verif', 'verification-code', 'csc', 'ccv'])) {
|
|
||||||
fillFields.code = f;
|
fillFields.code = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.brand && this.isFieldMatch(f[attr],
|
} else if (!fillFields.brand && this.isFieldMatch(f[attr],
|
||||||
|
|
|
@ -138,6 +138,30 @@ export class CreditCardAutoFillConstants {
|
||||||
"date-y",
|
"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.
|
// 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
|
// 0: English, 1: Danish, 2: German/Dutch, 3: French/Spanish/Italian, 4: Russian, 5: Portuguese
|
||||||
static readonly MonthAbbr = ["mm", "mm", "mm", "mm", "mm", "mm"];
|
static readonly MonthAbbr = ["mm", "mm", "mm", "mm", "mm", "mm"];
|
||||||
|
|
Loading…
Reference in New Issue