Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
/ creditable Public archive

Utilities for working with credit card form input.

License

Notifications You must be signed in to change notification settings

filamentgroup/creditable

Repository files navigation

⚠️ This project is archived and the repository is no longer maintained.

creditable

npm version Build 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>

About

Utilities for working with credit card form input.

Resources

License

Stars

Watchers

Forks

Packages

No packages published