Skip to content

Validation Error with Mongoose #3

@ghost

Description

POST URL - http://localhost:3000/api/v1/users
Body - email:[email protected]

I am using mongodb latest & node v7.8.0

MongooseError: User validation failed
at ValidationError (/home/yashkarani/Desktop/workspace/samples/nodejs/yanb/node_modules/mongoose/lib/error/validation.js:27:11)
at model.Document.invalidate (/home/yashkarani/Desktop/workspace/samples/nodejs/yanb/node_modules/mongoose/lib/document.js:1604:32)
at /home/yashkarani/Desktop/workspace/samples/nodejs/yanb/node_modules/mongoose/lib/document.js:1476:17
at validate (/home/yashkarani/Desktop/workspace/samples/nodejs/yanb/node_modules/mongoose/lib/schematype.js:760:7)
at /home/yashkarani/Desktop/workspace/samples/nodejs/yanb/node_modules/mongoose/lib/schematype.js:805:11
at Array.forEach (native)
at SchemaString.SchemaType.doValidate (/home/yashkarani/Desktop/workspace/samples/nodejs/yanb/node_modules/mongoose/lib/schematype.js:765:19)
at /home/yashkarani/Desktop/workspace/samples/nodejs/yanb/node_modules/mongoose/lib/document.js:1474:9
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions