{"action":"created","issue":{"url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/909","labels_url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/909/labels{/name}","comments_url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/909/comments","events_url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/909/events","html_url":"https://github.com/guillaumepotier/Parsley.js/pull/909","id":75135758,"number":909,"title":"Asyncmethod","user":{"login":"pascalheraud","id":4538416,"avatar_url":"https://avatars.githubusercontent.com/u/4538416?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalheraud","html_url":"https://github.com/pascalheraud","followers_url":"https://api.github.com/users/pascalheraud/followers","following_url":"https://api.github.com/users/pascalheraud/following{/other_user}","gists_url":"https://api.github.com/users/pascalheraud/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalheraud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalheraud/subscriptions","organizations_url":"https://api.github.com/users/pascalheraud/orgs","repos_url":"https://api.github.com/users/pascalheraud/repos","events_url":"https://api.github.com/users/pascalheraud/events{/privacy}","received_events_url":"https://api.github.com/users/pascalheraud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-11T08:26:32Z","updated_at":"2015-05-12T09:32:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/guillaumepotier/Parsley.js/pulls/909","html_url":"https://github.com/guillaumepotier/Parsley.js/pull/909","diff_url":"https://github.com/guillaumepotier/Parsley.js/pull/909.diff","patch_url":"https://github.com/guillaumepotier/Parsley.js/pull/909.patch"},"body":"Hello,\r\n\r\nWe have multiple issues regarding asyncMethod : \r\n- We want to use more than one async validator per field\r\n- We want different messages for each validator\r\n- We need to make the XHR call ourself (because we rely on a layer to do that).\r\n\r\nThe current implementation of async if too much based on jquery XHR and we propose to add a new async validator type.\r\nThe current one is the \"xhr\" type because it's base on XHR and we added a \"method\" one.\r\nThe goal of this validator is to provide only a method with a callback.\r\nThe method to async stuff and calls the callback with a boolean to say if it's success or not.\r\n\r\nTo use it, one has just to add a \"addAsyncMethod\".\r\nI've modified the dev.html file for having a clear example of how to use it. I don't think it has to be merged.\r\n\r\nI can provide tests and docs if you plan to merge it.\r\n\r\nPascal / La Roue Verte.\r\n\r\nIssues related : \r\nhttps://github.com/guillaumepotier/Parsley.js/issues/905"},"comment":{"url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/comments/101212068","html_url":"https://github.com/guillaumepotier/Parsley.js/pull/909#issuecomment-101212068","issue_url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/909","id":101212068,"user":{"login":"Flaburgan","id":930064,"avatar_url":"https://avatars.githubusercontent.com/u/930064?v=3","gravatar_id":"","url":"https://api.github.com/users/Flaburgan","html_url":"https://github.com/Flaburgan","followers_url":"https://api.github.com/users/Flaburgan/followers","following_url":"https://api.github.com/users/Flaburgan/following{/other_user}","gists_url":"https://api.github.com/users/Flaburgan/gists{/gist_id}","starred_url":"https://api.github.com/users/Flaburgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flaburgan/subscriptions","organizations_url":"https://api.github.com/users/Flaburgan/orgs","repos_url":"https://api.github.com/users/Flaburgan/repos","events_url":"https://api.github.com/users/Flaburgan/events{/privacy}","received_events_url":"https://api.github.com/users/Flaburgan/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T09:32:23Z","updated_at":"2015-05-12T09:32:23Z","body":"We are Java developers, I have no idea what a promise is. So not sure we can write this code. Is this something you would like to implement?"}}