Commit Graph

3 Commits

Author SHA1 Message Date
@im_8055
a94c6214ff
Fix spellings (#5710) 2021-10-31 11:36:03 +01:00
Christian Clauss
366a0f1839
Fix validate_initial_digits of credit_card_validator.py (#5600)
* Fix validate_initial_digits of credit_card_validator.py

@Bhargavishnu I think that I broke the logic of validate_initial_digits which should require that credit_card_number[0] is 3 before checking that credit_card_number[1] is 4, 5, or 7.  Please verify the new changes and the new test cases to make sure that this is correct.  Thanks!

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-10-26 14:32:34 +02:00
@im_8055
12e81ea6a2
Add credit card string validator (#5583)
* Add credit card validator

* 

* Add return type hint

* Add test cases for validator function

* Add test cases

* Feature: Rename file

* Update strings/cc_validator.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update strings/cc_validator.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update strings/cc_validator.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Review: Fix redundant checks

* Review: Refactor

* Fix: Update test cases

* Refactor

* Update credit_card_validator.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-26 07:21:07 +02:00