These are chat archives for Automattic/mongoose

Jul 2016
Joseph Thibeault
Jul 14 2016 03:51
Is there a way to list all populated paths on a document?
I need to somehow detect which paths were populated downstream
Matt Huijsse
Jul 14 2016 08:00

anyone have any ideas relating to

    value.validate(fn, {__noPromise: true});

TypeError: value.validate is not a function
    at /home/ubuntu/workspace/server/node_modules/mongoose/lib/schema/embedded.js:146:11

I have created a nested schema trying to make an any of requirement option but everytime I use it I crash the server and get this error

Matt Huijsse
Jul 14 2016 08:32
anyone know how to store 0's at the beginning of a number? trying to save phone numbers but it drops the prevailing 0
Alex Shpak
Jul 14 2016 08:36
use string
Matt Huijsse
Jul 14 2016 08:50
i suppose that could work, hmm, yea
i figured out why i was getting that issue with the validate error, it cant validate a schema
so I'm going to have to validate my any of at the frontend