Skip to content

ExpirationDateDialog allows only 10 years in advance (vs. 20 in DateValidator) #25

Closed
@hellmund

Description

@hellmund

We have some users who are unable to select their credit card's expiration date through ExpirationDateDialog - in case the expiration date is >10 years in the future. Meanwhile, the corresponding client-side validator technically allows for 20 years (see com.braintreepayments.cardform.utils.DateValidator.MAXIMUM_VALID_YEAR_DIFFERENCE)

Possible fix:

  • remove hard-coded magic number 10 in com.braintreepayments.cardform.view.ExpirationDateDialog.java:L91
  • replace with reference to MAXIMUM_VALID_YEAR_DIFFERENCE in DateValidator, change its visibility to public

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions