forked from leepowelldev/mongoose-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
40 lines (40 loc) · 1.92 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"author": {
"name": "Lee Powell",
"email": "[email protected]",
"url": "http://leepowell.co.uk"
},
"name": "mongoose-validator",
"description": "Validators for mongoose models utilising node-validator",
"keywords": [
"mongoose",
"validate",
"models"
],
"version": "0.2.1",
"contributors": [
{
"name": "Francesco Pasqua",
"url": "https://github.com/cesconix/"
}
],
"main": "./lib/mongoose-validator",
"homepage": "http://github.com/leepowellcouk/mongoose-validator",
"repository": {
"type": "git",
"url": "git://github.com/leepowellcouk/mongoose-validator.git"
},
"dependencies": {
"validator": "1.1.x"
},
"engines": {
"node": ">=0.2.2"
},
"devDependencies": {
"mongoose": "3.0.x"
},
"readme": "Mongoose Validator\n==================\n\nValidators for [Mongoose](http://mongoosejs.com) schemas utilising [node-validator](https://github.com/chriso/node-validator).\n\nMongoose Validator simply returns Mongoose style validation objects that utilise node-validator for the data validation.\n\n##Installation##\n\n\tnpm install mongoose-validator\n\n##Usage##\n\n\tvar mongoose = require('mongoose'),\n\t\tvalidate = require('mongoose-validator').validate;\n\t\n\t// validate([method], [arg1], [arg2] ... );\n\t\n\tvar nameValidator = [validate('len', 3, 50), validate('isAlphanumeric')];\n\t\n\tvar Schema = new mongoose.Schema({\n\t\tname: {type: String, required: true, validate: nameValidator}\n\t});\n\nError objects are returned as normal via Mongoose.\n\n##Error Messages##\n\nCustom error messages have been removed from 0.2.0 and as such Mongoose Validator makes sole use of the error messages provided by node-validator.\n\t\n##Contributors##\n\nSpecial thanks to Francesco Pasqua for heavily refactoring the into something far more future proof.\n",
"readmeFilename": "README.md",
"_id": "[email protected]",
"_from": "mongoose-validator"
}