Socket
Book a DemoInstallSign in
Socket

mongoose-iban

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-iban

Adds a new Mongoose type for IBAN bank account numbers.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

mongoose-iban

Gives you the Iban type to use in your schemas, complete with validation using the excellent arhs/iban library. An IBAN is a type of bank account number used extensively in Europe.

Usage

Start with an npm install --save mongoose-iban

var mongoose = require('mongoose');
var Schema = mongoose.Schema;

require('mongoose-iban').loadType(mongoose);

var Iban = Schema.Types.Iban;

var BankAccountSchema = new Schema({
  accountNumber: { type: Iban }
});

var BankAccountModel = mongoose.model('BankAccount', BankAccountSchema);

var bankAccount = new BankAccountModel({
  accountNumber: 'NL39 RABO 0300 0652 64'
});

This type will validate the entry and return an error if a wrong value is given.

Keywords

mongoose

FAQs

Package last updated on 14 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts