1.0.10 • Published 7 years ago

creditable v1.0.10

Weekly downloads
344
License
MIT
Repository
github
Last release
7 years ago

creditable

npm version Build Status Dependency Status

Utilities for working with credit card form input.

CreditableCardType

CreditableCardType( "4123 1234 1234 1234" );
// returns "VISA";

CreditableCardType( "5123 1234 1234 1234" );
// returns "MASTERCARD";

CreditableCardType( "6011 1234 1234 1234" );
// returns "DISCOVER";

CreditableCardType( "3412 123456 12345" );
// returns "AMEX";

CreditableSecurityCode

Update the Security Code placeholder and maxlength based on the card type of the number entered into the Credit Card field. Supports one pair of fields per form. Full demo in index.html.

<form>
	<label>
		Credit Card Number
		<input type="text" data-creditable-creditcard>
	</label>
	<label>
		Security Code
		<input type="text" data-creditable-securitycode>
	</label>
</form>
1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago