{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-validator/issues/25","labels_url":"https://api.github.com/repos/vuejs/vue-validator/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-validator/issues/25/comments","events_url":"https://api.github.com/repos/vuejs/vue-validator/issues/25/events","html_url":"https://github.com/vuejs/vue-validator/issues/25","id":91028745,"number":25,"title":"Dirty on remote data? / Delay validation until data is loaded","user":{"login":"JoshZA","id":136638,"avatar_url":"https://avatars.githubusercontent.com/u/136638?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshZA","html_url":"https://github.com/JoshZA","followers_url":"https://api.github.com/users/JoshZA/followers","following_url":"https://api.github.com/users/JoshZA/following{/other_user}","gists_url":"https://api.github.com/users/JoshZA/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshZA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshZA/subscriptions","organizations_url":"https://api.github.com/users/JoshZA/orgs","repos_url":"https://api.github.com/users/JoshZA/repos","events_url":"https://api.github.com/users/JoshZA/events{/privacy}","received_events_url":"https://api.github.com/users/JoshZA/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vuejs/vue-validator/labels/2.0","name":"2.0","color":"207de5"},{"url":"https://api.github.com/repos/vuejs/vue-validator/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/vuejs/vue-validator/milestones/1","html_url":"https://github.com/vuejs/vue-validator/milestones/v2.0","labels_url":"https://api.github.com/repos/vuejs/vue-validator/milestones/1/labels","id":1400131,"number":1,"title":"v2.0","description":"","creator":{"login":"kazupon","id":72989,"avatar_url":"https://avatars.githubusercontent.com/u/72989?v=3","gravatar_id":"","url":"https://api.github.com/users/kazupon","html_url":"https://github.com/kazupon","followers_url":"https://api.github.com/users/kazupon/followers","following_url":"https://api.github.com/users/kazupon/following{/other_user}","gists_url":"https://api.github.com/users/kazupon/gists{/gist_id}","starred_url":"https://api.github.com/users/kazupon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazupon/subscriptions","organizations_url":"https://api.github.com/users/kazupon/orgs","repos_url":"https://api.github.com/users/kazupon/repos","events_url":"https://api.github.com/users/kazupon/events{/privacy}","received_events_url":"https://api.github.com/users/kazupon/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":9,"state":"open","created_at":"2015-11-08T17:20:42Z","updated_at":"2015-11-24T13:46:54Z","due_on":"2015-11-29T15:00:00Z","closed_at":null},"comments":11,"created_at":"2015-06-25T17:36:48Z","updated_at":"2015-12-03T04:43:36Z","closed_at":null,"body":"```\r\n<template>\r\n                <form accept-charset=\"utf-8\" method=\"POST\">\r\n                    <div class=\"form-group required\">\r\n                        <label for=\"name\" class=\"form-label\">Name</label>\r\n\r\n                        <div class=\"controls\"><input id=\"name\" class=\"form-control\" type=\"text\"\r\n                                                     v-model=\"client.name\" v-validate=\"required,minLength:3\"></div>\r\n                    </div>\r\n\r\n                    <div class=\"form-actions\"><input class=\"btn-primary btn\" type=\"submit\" value=\"Save Client\" v-attr=\"disabled: invalid || !dirty\"></div>\r\n                </form>\r\n</template>\r\n<script>\r\n    module.exports = {\r\n        replace: true,\r\n        props: ['params'],\r\n        data: function () {\r\n            return {\r\n                params: {\r\n                    clientEditId: null\r\n                },\r\n                client: null\r\n            }\r\n        },\r\n        compiled: function () {\r\n            this.update()\r\n        },\r\n        watch: {\r\n            'params.clientEditId': 'update'\r\n        },\r\n        methods: {\r\n            update: function () {\r\n                var resource = this.$resource('/client/client/:id');\r\n                resource.get({id: this.params.clientEditId}, function (item, status, request) {\r\n                    this.client = item\r\n                    this.dirty = false //doesn't work!\r\n                }.bind(this))\r\n            }\r\n        },\r\n\r\n    }\r\n</script>\r\n```\r\n\r\n\r\nIn this example, dirty() is always false, because the data->client has been changed from its initial state of null.\r\n\r\nHow can we disable validation until the data is loaded? \r\n\r\nOr set dirty = false, once the object has been loaded?\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-validator/issues/comments/161512844","html_url":"https://github.com/vuejs/vue-validator/issues/25#issuecomment-161512844","issue_url":"https://api.github.com/repos/vuejs/vue-validator/issues/25","id":161512844,"user":{"login":"kazupon","id":72989,"avatar_url":"https://avatars.githubusercontent.com/u/72989?v=3","gravatar_id":"","url":"https://api.github.com/users/kazupon","html_url":"https://github.com/kazupon","followers_url":"https://api.github.com/users/kazupon/followers","following_url":"https://api.github.com/users/kazupon/following{/other_user}","gists_url":"https://api.github.com/users/kazupon/gists{/gist_id}","starred_url":"https://api.github.com/users/kazupon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazupon/subscriptions","organizations_url":"https://api.github.com/users/kazupon/orgs","repos_url":"https://api.github.com/users/kazupon/repos","events_url":"https://api.github.com/users/kazupon/events{/privacy}","received_events_url":"https://api.github.com/users/kazupon/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T04:43:36Z","updated_at":"2015-12-03T04:43:36Z","body":"@JoshZA \r\nSorry, i don't implement yet.\r\nI'll implement."}}