braintree / android-card-form

A ready-made card form layout that can be included in your Android app, making it easy to accept credit and debit cards.
MIT License
366 stars 130 forks source link

Field validation always required #86

Open omargobran opened 4 years ago

omargobran commented 4 years ago

General information

Issue description

There is an issue if an Edittext is needed to be shown on the screen but without blocking validation (i.e. the field should not be required in validation but only should be shown as a field) left to the user to decide to enter the required data or leave it empty.

omargobran commented 4 years ago

I have cloned the project and solved this issue on my own local branch. If you would like I could push it and you can check the changes.

scannillo commented 4 years ago

Hi @omargobran, you are welcome to open a PR!

Depending on the fields you are requesting to remove validation from, we may or may not be able to accept the changes. Please either open a PR or provide more specifics to the fields you are looking to allow to be optional.

tolulekes commented 4 years ago

Hi @omargobran has this issue been corrected in the code?

omargobran commented 4 years ago

No, it hasn't been solved yet, but I will be opening a PR asap.

sarahkoop commented 2 years ago

Hi @omargobran are you still working on a PR for this?

omargobran commented 2 years ago

No @sarahkoop. Unfortunately, the code was on my old device and it got formatted. Has this issue not been solved yet? If so, I can rewrite my code and submit a PR for review.

sarahkoop commented 2 years ago

Hi @omargobran - The current expected behavior in CardForm is to allow a developer to configure which fields are required, but to validate any required fields (with the exception of cardholderName). If there are fields that you wold specifically like to display as optional, but not validate, we may be able to accept the change depending on the fields.