Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Validating credit card
#5
Thank you for your reply. I am getting the same error.
[b]Traceback (most recent call last):
  File "python", line 18, in <module>
  File "python", line 18, in <listcomp>
ValueError: invalid literal for int() with base 10: '-'[/b]
After this my goal is to make the program print "False" when it detects other user inputs like these "5497.3571,7063*2130".So i must exclude dots,commas and asterisks,and weird inputs like these "54 97357 170632 130"
Reply


Messages In This Thread
Validating credit card - by frequency - Nov-04-2018, 01:03 PM
RE: Validating credit card - by gontajones - Nov-04-2018, 01:22 PM
RE: Validating credit card - by frequency - Nov-04-2018, 05:43 PM
RE: Validating credit card - by gontajones - Nov-04-2018, 10:59 PM
RE: Validating credit card - by frequency - Nov-05-2018, 08:58 AM
RE: Validating credit card - by gontajones - Nov-05-2018, 09:46 AM
RE: Validating credit card - by frequency - Nov-05-2018, 09:53 AM
RE: Validating credit card - by frequency - Nov-05-2018, 05:46 PM
RE: Validating credit card - by frequency - Nov-05-2018, 07:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] formula for validating monetary values? kakos_k9 1 795 Dec-17-2022, 09:28 PM
Last Post: woooee
  Having strange results from an RFID HID card reader - I'm stuck orbisnz 1 1,531 Mar-28-2022, 08:20 AM
Last Post: Larz60+
  SQL wild card use hammer 3 1,325 Jan-07-2022, 02:17 PM
Last Post: hammer
  Validating user input WJSwan 2 2,174 Jul-06-2020, 07:21 AM
Last Post: menator01
  Validating the functionality of the application rpalakodety 1 1,807 Dec-30-2019, 07:58 PM
Last Post: ndc85430
  Validating information from .csv file before executemany mzmingle 7 4,527 Apr-15-2019, 01:40 PM
Last Post: mzmingle
  need help with making a validating function drasil 8 3,798 Mar-28-2019, 10:38 AM
Last Post: perfringo
  Credit card number redacting script Drone4four 6 5,334 Jan-18-2019, 02:07 PM
Last Post: Drone4four
  Validating Input (basic check for int etc) gruntfutuk 1 2,512 Aug-06-2018, 07:43 AM
Last Post: gruntfutuk
  individual's ID card number in python danpek 2 3,815 Jun-14-2018, 04:07 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020