{"action":"reopened","issue":{"url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/326","labels_url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/326/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/326/comments","events_url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/326/events","html_url":"https://github.com/balderdashy/sails-mongo/issues/326","id":103275919,"number":326,"title":"Setting schema:true breaks validation","user":{"login":"AmarPrabhu","id":1422560,"avatar_url":"https://avatars.githubusercontent.com/u/1422560?v=3","gravatar_id":"","url":"https://api.github.com/users/AmarPrabhu","html_url":"https://github.com/AmarPrabhu","followers_url":"https://api.github.com/users/AmarPrabhu/followers","following_url":"https://api.github.com/users/AmarPrabhu/following{/other_user}","gists_url":"https://api.github.com/users/AmarPrabhu/gists{/gist_id}","starred_url":"https://api.github.com/users/AmarPrabhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmarPrabhu/subscriptions","organizations_url":"https://api.github.com/users/AmarPrabhu/orgs","repos_url":"https://api.github.com/users/AmarPrabhu/repos","events_url":"https://api.github.com/users/AmarPrabhu/events{/privacy}","received_events_url":"https://api.github.com/users/AmarPrabhu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-26T13:57:36Z","updated_at":"2015-10-27T12:14:47Z","closed_at":null,"body":"If `schema: true` on a model, then\r\n``` \r\nMymodel\r\n.create(mydata)\r\n.then(function(modeldata){\r\n    //do foo\r\n})\r\n.catch(function(err){\r\n    if(err){\r\n        console.log(err.code); //returns null\r\n        console.log(err.invalidAttributes); //returns null\r\n    }\r\n}); \r\n```\r\n\r\nsetting `schema:false` however returns the error codes and invalid attributes. Am I missing something here? What should be the Model if I want only defined attributes to be inserted, and also get validation errors?\r\n"}}