Blueconfig-format-with-validator
Format 'email', 'ipaddress' and 'url' for blueconfig with validatorjs.
Install
npm install blueconfig-format-with-validator
Usage
An example config.js
file:
const blueconfig = ; blueconfig; // or :// blueconfig.addFormats(require('blueconfig-format-with-validator')); // Define a schemavar config = ;
Validation
This package uses validator.js to validate:
email
ipaddress
- IPv4 and IPv6 addressesurl
Coercion
Blueconfig will automatically coerce strings variables to their proper types when importing them.