{"action":"opened","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/4125","repository_url":"https://api.github.com/repos/balderdashy/sails","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/4125/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/4125/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/4125/events","html_url":"https://github.com/balderdashy/sails/issues/4125","id":237083338,"number":4125,"title":"Error (E_VALIDATION) :: 1 attribute is invalid  - Errors ","user":{"login":"bryanpleblanc","id":25310829,"avatar_url":"https://avatars3.githubusercontent.com/u/25310829?v=3","gravatar_id":"","url":"https://api.github.com/users/bryanpleblanc","html_url":"https://github.com/bryanpleblanc","followers_url":"https://api.github.com/users/bryanpleblanc/followers","following_url":"https://api.github.com/users/bryanpleblanc/following{/other_user}","gists_url":"https://api.github.com/users/bryanpleblanc/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanpleblanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanpleblanc/subscriptions","organizations_url":"https://api.github.com/users/bryanpleblanc/orgs","repos_url":"https://api.github.com/users/bryanpleblanc/repos","events_url":"https://api.github.com/users/bryanpleblanc/events{/privacy}","received_events_url":"https://api.github.com/users/bryanpleblanc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-20T03:32:23Z","updated_at":"2017-06-20T03:32:23Z","closed_at":null,"body":"I've looked all over the web for a similar issue to my problem and I can't seem to find one. Whenever I try to Save or Update my 'Person' model I keep receiving an \"Error (E_VALIDATION) :: 1 attribute is invalid\" error. This behavior would be normal and easy to fix if my attribute was missing or the type wasn't an integer. However, when I Update or Save the user with the correct attributes I always get the same attribute errors. \r\n\r\nI can remove the errors by changing **likesLength** to 'numeric' and removing 'required: true' from **name** and **addedBy**.  This isn't something I want to do. \r\n\r\nHave you seen this error before and is there anything I can do? \r\n\r\nPerson Model\r\n```\r\n attributes: {\r\n    name : { type: 'string', required: true}, <= PROBLEM\r\n    image : { type: 'string'}, \r\n    addedBy : {type: 'string', required: true}, <= PROBLEM\r\n    list : { type: 'string'}, \r\n    listId : { model: 'list' }, \r\n    listUrl : { type: 'string'}, \r\n    desc : { type: 'string' }, \r\n    url: { type: 'string'}, \r\n    featured: { type: 'boolean'}, \r\n    likes: {type: 'array'},\r\n    likesLength: {type: 'integer'} <= PROBLEM\r\n```\r\n\r\n```\r\n\r\n\r\nError (E_VALIDATION) :: 3 attributes are invalid\r\n    at WLValidationError.WLError (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/error/WLError.js:25:15)\r\n    at new WLValidationError (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/error/WLValidationError.js:19:28)\r\n    at _afterValidating (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/query/validate.js:53:23)\r\n    at allValidationsChecked (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/core/validations.js:265:12)\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:52:16\r\n    at Object.async.forEachOf.async.eachOf (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:236:30)\r\n    at Object.async.forEach.async.each (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:209:22)\r\n    at Validator.validate (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/core/validations.js:144:9)\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/query/validate.js:42:25\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:718:13\r\n    at Immediate.iterate (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:262:13)\r\n    at runCallback (timers.js:672:20)\r\n    at tryOnImmediate (timers.js:645:5)\r\n    at processImmediate [as _immediateCallback] (timers.js:617:5)\r\n\r\nInvalid attributes sent to Person:\r\n • name\r\n   • \"required\" validation rule failed for input: 'Elizabeth Danhakl'\r\nSpecifically, it threw an error.  Details:\r\n TypeError: validator.isNull is not a function\r\n    at Object.required (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/anchor/lib/match/rules.js:23:23)\r\n    at Object.matchRule (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/anchor/lib/match/matchRule.js:41:20)\r\n    at Anchor.to (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/anchor/index.js:106:48)\r\n    at afterwards (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/core/validations.js:229:41)\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:52:16\r\n    at Object.async.forEachOf.async.eachOf (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:236:30)\r\n    at Object.async.forEach.async.each (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:209:22)\r\n    at _eachValidation (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/core/validations.js:189:11)\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:181:20\r\n    at Object.async.forEachOf.async.eachOf (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:233:13)\r\n    at Object.async.forEach.async.each (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:209:22)\r\n    at Validator.validate (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/core/validations.js:144:9)\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/query/validate.js:42:25\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:718:13\r\n    at Immediate.iterate (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:262:13)\r\n    at runCallback (timers.js:672:20)\r\n    at tryOnImmediate (timers.js:645:5)\r\n    at processImmediate [as _immediateCallback] (timers.js:617:5)\r\n • addedBy\r\n   • \"required\" validation rule failed for input: 'paulie'\r\nSpecifically, it threw an error.  Details:\r\n TypeError: validator.isNull is not a function\r\n    at Object.required (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/anchor/lib/match/rules.js:23:23)\r\n    at Object.matchRule (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/anchor/lib/match/matchRule.js:41:20)\r\n    at Anchor.to (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/anchor/index.js:106:48)\r\n    at afterwards (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/core/validations.js:229:41)\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:52:16\r\n    at Object.async.forEachOf.async.eachOf (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:236:30)\r\n    at Object.async.forEach.async.each (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:209:22)\r\n    at _eachValidation (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/core/validations.js:189:11)\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:181:20\r\n    at Object.async.forEachOf.async.eachOf (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:233:13)\r\n    at Object.async.forEach.async.each (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:209:22)\r\n    at Validator.validate (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/core/validations.js:144:9)\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/lib/waterline/query/validate.js:42:25\r\n    at /Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:718:13\r\n    at Immediate.iterate (/Applications/MAMP/htdocs/ysk2/node_modules/waterline/node_modules/async/lib/async.js:262:13)\r\n    at runCallback (timers.js:672:20)\r\n    at tryOnImmediate (timers.js:645:5)\r\n    at processImmediate [as _immediateCallback] (timers.js:617:5)\r\n • likesLength\r\n   • Value should be an integer (instead of 1, which is a number)\r\n\r\n\r\n```"}}
{"actor":{"display_login":"bryanpleblanc"}}