I want to write a function to accept a single string that represent a credit card number as parameter and validates it with the format
9999 9999 9999
where 9 is any digit and each quadruplet is separated with a single space.
ougesh
0
Newbie Poster
Recommended Answers
Jump to Post1. what do you mean 'validates it with'? you mean: formats it to look like?
and ehm ... what is stopping you from doing so?
Jump to Postcan't help you if you can't even figure that out for yourself...
That said, it's a completely incorrect way to "validate" a credit card number. Not only is the number of digits incorrect for some types of cards, there is a strict requirement for the number to be a valid …
All 5 Replies
stultuske
1,116
Posting Maven
Featured Poster
ougesh
0
Newbie Poster
jwenting
1,889
duckman
Team Colleague
ougesh
0
Newbie Poster
stultuske
1,116
Posting Maven
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.