Skip to content

Conversation

vlasscontreras
Copy link
Contributor

American Express cards only support 4-digit security codes.

Your credit card CVV code may not be in the same place on every credit card. If you have an American Express® Card, you will find the four-digit credit card CVV on the front.

Source: https://www.americanexpress.com/ca/en/articles/life-with-amex/learn/what-is-credit-card-cvv/

This PR makes the AmericanExpress cards explicitly have 4-digit CVC and adds 2 test assertions.

* @var array
*/
protected $cvc_length = [3, 4];
protected $cvc_length = [4];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But American Express supports 3 and 4 digits:
https://www.americanexpress.com/ca/en/articles/life-with-amex/learn/what-is-credit-card-cvv/

This three- or four-digit code tells the merchant that you are in possession of the card

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's referring to a CVV code in general, since in the previous paragraph it says:

Depending on your credit card provider [...]

But later, they explicitly say (the part I quoted in the PR):

If you have an American Express® Card, you will find the four-digit credit card CVV [...]

@ssx ssx merged commit ffe384a into laravel-validation-rules:master Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants