mongoose-imei
Gives you the Imei
type to use in your schemas, complete with validation using node-imei library. https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity
Usage
Start with an npm install --save mongoose-imei
const mongoose = ;const imei = ; const Schema = mongooseSchema; imei; const PhoneSchema = phone: type: SchemaTypesImei ; const PhoneModel = mongoose; const phone = imei: '351680077319519';
This type will validate the entry and return an error if a wrong value is given.