{"action":"created","issue":{"url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/171","repository_url":"https://api.github.com/repos/offirgolan/ember-cp-validations","labels_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/171/comments","events_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/171/events","html_url":"https://github.com/offirgolan/ember-cp-validations/pull/171","id":149016285,"number":171,"title":"Value option","user":{"login":"offirgolan","id":575938,"avatar_url":"https://avatars.githubusercontent.com/u/575938?v=3","gravatar_id":"","url":"https://api.github.com/users/offirgolan","html_url":"https://github.com/offirgolan","followers_url":"https://api.github.com/users/offirgolan/followers","following_url":"https://api.github.com/users/offirgolan/following{/other_user}","gists_url":"https://api.github.com/users/offirgolan/gists{/gist_id}","starred_url":"https://api.github.com/users/offirgolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/offirgolan/subscriptions","organizations_url":"https://api.github.com/users/offirgolan/orgs","repos_url":"https://api.github.com/users/offirgolan/repos","events_url":"https://api.github.com/users/offirgolan/events{/privacy}","received_events_url":"https://api.github.com/users/offirgolan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-18T01:21:47Z","updated_at":"2016-04-21T19:49:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/offirgolan/ember-cp-validations/pulls/171","html_url":"https://github.com/offirgolan/ember-cp-validations/pull/171","diff_url":"https://github.com/offirgolan/ember-cp-validations/pull/171.diff","patch_url":"https://github.com/offirgolan/ember-cp-validations/pull/171.patch"},"body":"Used to retrieve the value to validate. This will overwrite the validator's default `value` method.\r\nBy default this returns `model[attribute]`.\r\n\r\n```javascript\r\n// Examples\r\nvalidator('date', {\r\n   value() {\r\n \t// Format the orignal value before passing it into the validator\r\n \tconst rawValue = this.get(this.get('model'), this.get('attribute'));\r\n \treturn moment().utc(rawValue).format('DD/MM/YYY');\r\n   }\r\n})\r\nvalidator('number', {\r\n   value() {\r\n \t// Validate a value that is not the current attribute\r\n \treturn this.get('model').get('someOtherAttr');\r\n   }\r\n})\r\n```\r\n\r\n@blimmer @stefanpenner Let me know what you think of this. Implementation is open for debate.\r\n\r\nResolves #166"},"comment":{"url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/comments/213086957","html_url":"https://github.com/offirgolan/ember-cp-validations/pull/171#issuecomment-213086957","issue_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/171","id":213086957,"user":{"login":"offirgolan","id":575938,"avatar_url":"https://avatars.githubusercontent.com/u/575938?v=3","gravatar_id":"","url":"https://api.github.com/users/offirgolan","html_url":"https://github.com/offirgolan","followers_url":"https://api.github.com/users/offirgolan/followers","following_url":"https://api.github.com/users/offirgolan/following{/other_user}","gists_url":"https://api.github.com/users/offirgolan/gists{/gist_id}","starred_url":"https://api.github.com/users/offirgolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/offirgolan/subscriptions","organizations_url":"https://api.github.com/users/offirgolan/orgs","repos_url":"https://api.github.com/users/offirgolan/repos","events_url":"https://api.github.com/users/offirgolan/events{/privacy}","received_events_url":"https://api.github.com/users/offirgolan/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T19:49:15Z","updated_at":"2016-04-21T19:49:15Z","body":"Unfortunately yes. There is no way for us to determine what dependents are\nneeded.\n\nOn Friday, April 22, 2016, Ben Limmer <notifications@github.com> wrote:\n\n> I really like the direction of this, especially with the date example. I\n> have run into this exact situation quite a few times. My only question is\n> about dependent keys. Is it the consumer's responsibility to pass\n> additional dependent keys if they're relied upon in value()?\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly or view it on GitHub\n> <https://github.com/offirgolan/ember-cp-validations/pull/171#issuecomment-212889562>\n>\n\n\n-- \nThanks,\nOffir Golan\n"}}