Download
User Rating: 0/5 ( 0 votes)
ForceBankingCard is a Plugin Jquery for validate debit and credit cards
Source: github.com
1. INCLUDE JS FILES
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="js/jquery.ForceBankingCard.js"></script>
2. HTML
<input type="text" id="cardNumber1" >
3. JAVASCRIPT
$("#cardNumber1").ForceBankingCard();
4. OPTIONS
-
align: Align text on input [ left | center | right ],
-
length: Max length for input field [Integer number],
-
separatorGroup: If existe decimal part [ true | false ],
-
charSeparator: Character for separator group [ character ],
-
digitsGroup: Number digits for group [Integer number],
-
clearOnClick: If click in input clear field [ true | false ],
-
blockCutCopyPaste: If it is possible to cut copy paste [ true | false ],
-
cardsValidate: Card list for validade [ array | string ] { AmericanExpress | DinersClubCarteBlanche | JCB | Laser | VisaElectron | Visa | Dankort | InterPayment | MasterCard | Maestro | Discover },
5. CALLBACKS
-
onSuccessValidate: Callback for card is valid [ function() {} ],
-
onErrorValidate: Callback for card is not valid [ function() {} ],
-
onkeyUp: Callback for keyUp [ function() {} ]
6. METHODS
-
destroy: Remove plugin the element (events and data)