Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix#1252:Display error message if expiry date is invalid #1253

Closed
wants to merge 1 commit into from

Conversation

harshhks2
Copy link
Contributor

@harshhks2 harshhks2 commented Mar 6, 2021

Issue Fix

Fixes #1252

Screenshots

WhatsApp.Video.2021-03-06.at.11.40.56.AM.mp4

Description

Error message is displayed if the expiry date entered by the user is before the current month and/or the current year or the entered year is after 10 years of the current year. Now the user can know and edit if he enters the wrong expiry date by mistake or his debit card has already expired.

  • Apply the AndroidStyle.xml style template to your code in Android Studio.

  • Run the unit tests with ./gradlew check to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

mDebitCardView.verifyDebitCardError(getContext()
.getString(R.string.expiry_month_error_message), 2);
} else if (expiryMonth <= currentMonth && expiryYear == currentYear) {
mDebitCardView.verifyDebitCardError(getContext()
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a condition if expiryMonth<currentMonth and expiryYear<=currentYear

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I will surely do that. Should I generate a new pull request after making the required changes? Also I don't know why this pull request failed the static analysis check although on my system it doesn't show any problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@haran2248 I have made the changes you asked for. Can you please review this?

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.

No error message is displayed for invalid expiry month and/or year
3 participants