Skip to content

A simple credit card validation and format library for most popular credit cards in the world.

License

Notifications You must be signed in to change notification settings

savepopulation/creditcard-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

creditcardvalidator

A simple credit card validation and format library for most popular credit cards in the world.

How to use?

1- Setup your validator:

CreditCardValidator creditCardValidator = new CardValidatorBuilder()
                .addVisaCardValidator()
                .addMasterCardValidador()
                .addAmexCardValidator()
                .addDiscoverCardValidator()
                .addDinClubCardValidator()
                .addJcbCardValidator()
                .setTypeChangeListener(this)
                .setValidationChangeListener(this)
                .setFormatable(true)
                .build();

2- Add it to your EditText:

final EditText editTextCardNumber = (EditText) findViewById(R.id.edittext_card_number);
editTextCardNumber.addTextChangedListener(creditCardValidator);

About

A simple credit card validation and format library for most popular credit cards in the world.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages