The base for a Credit Card component in React
APACHE-2.0 License
Card type detection using regex for a credit card form component. As managing money for programmers is important, we have to make sure things like card issuer are as the user says; also we have to take care of the looks.
This projects shows how to check dynamically for the Network issuing certain cards based on the Issuer identification number (IIN). This way we can create better user experience and take care of security issues, for example validating client-side the card number.
Based on this gist
This project was bootstrapped with Create React App. So is already setup to be wasily developed and run.
You will need Node.js version 8.0 or greater installed on your system.
Get the code by either cloning this repository using git
git clone [email protected]:Israel-Laguan/credit-card-component.git
... or downloading source code as a zip archive.
Once downloaded, open the terminal in the project directory, and install dependencies with:
npm install
Then start the app with:
npm start
The app should now be up and running at http://localhost:3000 🚀
In the project directory, you can run:
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run publish
Builds and then publish the app to surge.sh
, in this case to http://credit-card-component.surge.sh/
.
🤝 Contributions, issues and feature requests are welcome! Feel free to check the issues page.
🤗 Give a ⭐️ if you like this project!
Icons from:
Icons8
Regexs: Adapted form here Design Idea: Dribble
📝 This project is licensed under the Apache 2 Feel free to fork this project and improve it