Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Validate credit card number using JavaScript.

Author  Topic 

ali_786
Starting Member

3 Posts

Posted - 2008-03-03 : 06:52:21
Hi
Any one knows how to validate a valid credit card number using JavaScript and what are the rules to be follow while making logic please guide me as soon as possible.
Thanks.

Ali.

webmaster http://www.GlobalGuideLine.com

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-03-03 : 07:30:58
moved from script library.

don't do these checks in javascript. do them on the server.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

jhocutt
Constraint Violating Yak Guru

385 Posts

Posted - 2008-03-03 : 07:53:36
As spirit said o the validation in the backend.
But you can do a quick front end check here, just to be sure it is close.

http://javascript.internet.com/forms/val-credit-card.html



"God does not play dice" -- Albert Einstein
"Not only does God play dice, but he sometimes throws them where they cannot be seen."
-- Stephen Hawking
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-03-03 : 08:49:34
If it's only LUHN algorithm you want, see this
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76195



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-03-03 : 09:05:08
this is acctually something that should be checked in a database if you ask me.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -