{"action":"created","issue":{"url":"https://api.github.com/repos/jagi/meteor-astronomy-validators/issues/17","labels_url":"https://api.github.com/repos/jagi/meteor-astronomy-validators/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/jagi/meteor-astronomy-validators/issues/17/comments","events_url":"https://api.github.com/repos/jagi/meteor-astronomy-validators/issues/17/events","html_url":"https://github.com/jagi/meteor-astronomy-validators/issues/17","id":103803446,"number":17,"title":"Having a denyUpdate() and denyInsert() validators","user":{"login":"shadowRR","id":13820157,"avatar_url":"https://avatars.githubusercontent.com/u/13820157?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowRR","html_url":"https://github.com/shadowRR","followers_url":"https://api.github.com/users/shadowRR/followers","following_url":"https://api.github.com/users/shadowRR/following{/other_user}","gists_url":"https://api.github.com/users/shadowRR/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowRR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowRR/subscriptions","organizations_url":"https://api.github.com/users/shadowRR/orgs","repos_url":"https://api.github.com/users/shadowRR/repos","events_url":"https://api.github.com/users/shadowRR/events{/privacy}","received_events_url":"https://api.github.com/users/shadowRR/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jagi/meteor-astronomy-validators/labels/feature","name":"feature","color":"008000"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-08-28T22:05:36Z","updated_at":"2015-09-09T17:35:56Z","closed_at":"2015-09-09T17:35:56Z","body":"Since they would be used for many reason, like for example not permitting to change a userId after the first insert that would have been done server side, i think denyUpdate() and denyInsert() could be part of the core astronomy validators. They could look like this :\r\n```\r\nAstro.createValidator({\r\n    name: 'denyUpdate',\r\n    validate: function(fieldValue, fieldName, options) {\r\n        if(this._id && _.has(this.getModified(), fieldName)) {\r\n            return false;\r\n        }\r\n        return true;\r\n    }\r\n});\r\n```\r\n\r\nWhat do you think ?"},"comment":{"url":"https://api.github.com/repos/jagi/meteor-astronomy-validators/issues/comments/138985917","html_url":"https://github.com/jagi/meteor-astronomy-validators/issues/17#issuecomment-138985917","issue_url":"https://api.github.com/repos/jagi/meteor-astronomy-validators/issues/17","id":138985917,"user":{"login":"jagi","id":1051229,"avatar_url":"https://avatars.githubusercontent.com/u/1051229?v=3","gravatar_id":"","url":"https://api.github.com/users/jagi","html_url":"https://github.com/jagi","followers_url":"https://api.github.com/users/jagi/followers","following_url":"https://api.github.com/users/jagi/following{/other_user}","gists_url":"https://api.github.com/users/jagi/gists{/gist_id}","starred_url":"https://api.github.com/users/jagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagi/subscriptions","organizations_url":"https://api.github.com/users/jagi/orgs","repos_url":"https://api.github.com/users/jagi/repos","events_url":"https://api.github.com/users/jagi/events{/privacy}","received_events_url":"https://api.github.com/users/jagi/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T17:35:56Z","updated_at":"2015-09-09T17:35:56Z","body":"The `immutable` property implemented. Will appear in the 1.0 release."}}