1.0.3 • Published 7 years ago

joi-creditcard-extension v1.0.3

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

joi-creditcard-extension

Joi extension for credit card validation

CircleCI npm version Known Vulnerabilities

Lead Maintainer: Phillipe Lopes

Usage

Usage is a two steps process. First, a schema is constructed using the provided types and constraints:

const BaseJoi = require('joi');
const Extension = require('joi-creditcard-extension');
const Joi = BaseJoi.extend(Extension);

const schema = Joi.creditcard().number();
Joi.validate('5217 8503 2851 5461', Joi.creditcard().number()) // Output 5217850328515461

API

Take a look at the tests

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago