How to use the card-validator.postalCode function in card-validator

To help you get started, we’ve selected a few card-validator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ProtonMail / react-components / containers / payments / cardValidator.js View on Github external
export const isPostalCode = (value) => valid.postalCode(value, 4).isValid;
export const isExpirationDate = (month, year) => valid.expirationDate({ month, year }).isValid;

card-validator

A library for validating credit card fields

MIT
Latest version published 5 months ago

Package Health Score

72 / 100
Full package analysis

Similar packages