javascript - RegEx for Isracard (Israel Card) -
i need regular expression isracard (israel credit card).
would grateful help, or maybe info how make it.
format of isracard 8-9 digits.
ex. picture of card - http://images.delcampe.com/img_large/auction/000/157/341/572_001.jpg
i found validation isracard:
<script> var cardvalid=function(cardno){ var sum = 0, inum; for( var in cardno+='' ){ inum = parseint(cardno[i]); sum += i%2?inum:inum>4?inum*2%10+1:inum*2; } return !(sum%10); }; </script> asp vb script isracard credit card number validation (8 or 9 digits) <% function isracardcheck(strnumber) comp1 = "987654321" comp2 = strnumber srez = 0 if len(comp2) < 9 comp2 = "0" & comp2 = 1 9 = mid(comp1, i, 1) b = mid(comp2, i, 1) c = * b srez = srez + c next if srez mod 11 = 0 isracheck = true else isracheck = false end if end function %>
i copied code there , more information , details may want check link itself: anatomy of credit card number formats
Comments
Post a Comment