To create a project, you must verify that the bank card format meets the requirements. Thank you! To create a project, you must verify that the bank card format meets the requirements.
Thank you!
Reply content:
To create a project, you must verify that the bank card format meets the requirements.
Thank you!
First, check the format of the bank card, and then use the regular expression to verify it. What else do you want?
Simple
// Regular Expression verification bank card method var check = function (content) {var regex =/^ (998801 | 998802 | 622525 | 622526 | 435744 | 435745 | 483536 | 528020 | 526855 | 622156 | 622155 | 356869 | 531659 | 622157 | 627066 | 627067 | 627068 | | 627069) d {10} $/; if (regex. test (content) {return true;} return false ;}
Complicated
The 16th bits are verified by Luhm. For details, refer to this article: bank card verification.