Since this is an example project, its docs
folder has been added to the repository. It should be accessible here: https://autioch.github.io/cc-validator/
- Download or clone repository.
- In project directory run
npm install
(node required). - For usage via browser - run
npm run build:watch
and access project vialocalhost:8080
. - For publishing, run
npm run build:production
. This will place minified version in the dist folder. - For cli/module usage, see
example/cli.js
- Available field types are stored in
src/form/field
. - Configuration of displayed fields and other details can be found in
src/schema.js
. - Whole app model is available (for development)
Tested in latest Chrome, Firefox and Edge.
- Node style
require
used instead ofimport
for compatibility with node without extra tools. - Classic prototypical inheritance instead of ES6 classes.
- Some shortcuts were made due to time limit for the project.
- Credit card number expects just 16 digits. I'm out of time to implement the mod 10 algorithm and to check for correct number of digits.
- No time left for tests, however validation methods are moved to separate files, so adding tests should be really simple.