{"action":"created","issue":{"url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/735","labels_url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/735/labels{/name}","comments_url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/735/comments","events_url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/735/events","html_url":"https://github.com/guillaumepotier/Parsley.js/issues/735","id":43245393,"number":735,"title":"addAsyncValidator: beforeSend function to hande ajax data option and other who need element state","user":{"login":"robgha01","id":362726,"avatar_url":"https://avatars.githubusercontent.com/u/362726?v=3","gravatar_id":"","url":"https://api.github.com/users/robgha01","html_url":"https://github.com/robgha01","followers_url":"https://api.github.com/users/robgha01/followers","following_url":"https://api.github.com/users/robgha01/following{/other_user}","gists_url":"https://api.github.com/users/robgha01/gists{/gist_id}","starred_url":"https://api.github.com/users/robgha01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robgha01/subscriptions","organizations_url":"https://api.github.com/users/robgha01/orgs","repos_url":"https://api.github.com/users/robgha01/repos","events_url":"https://api.github.com/users/robgha01/events{/privacy}","received_events_url":"https://api.github.com/users/robgha01/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/guillaumepotier/Parsley.js/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-09-19T14:39:40Z","updated_at":"2015-09-19T17:22:55Z","closed_at":"2015-09-19T17:22:55Z","body":"Fix forked: https://github.com/guillaumepotier/Parsley.js/issues/736\r\n\r\nI have the following code:\r\n```addAsyncValidator('validzipcode',\r\n    function (value) {\r\n        console.log(this.$element); // jQuery Object[ input[name=\"q\"] ]\r\n\r\n        return 404 === value.status;\r\n    }, \"/ServiceMethods.asmx/SsnIsValid\", { type: \"POST\", data: JSON.stringify({ ssn: ??? }), dataType: \"json\", contentType: \"application/json; charset=utf-8\" });```\r\n\r\nI cant figure out how to pass the value from the input that i have decoreted the validator with to the data -> ssn object i first tried to write \"value\" and then parsley would change that to the input value but it dident work that way how is it possible to pass the value to ssn without calling $(\"element\").val() ?\r\n\r\nTo solve this maybe a new attribute can be added where we get the opportunity to set the name of the value that will get sent to the server or to use some sort of magic word that get replaced ex: \"parsleyValue\" something like that ?"},"comment":{"url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/comments/141690652","html_url":"https://github.com/guillaumepotier/Parsley.js/issues/735#issuecomment-141690652","issue_url":"https://api.github.com/repos/guillaumepotier/Parsley.js/issues/735","id":141690652,"user":{"login":"marcandre","id":33770,"avatar_url":"https://avatars.githubusercontent.com/u/33770?v=3","gravatar_id":"","url":"https://api.github.com/users/marcandre","html_url":"https://github.com/marcandre","followers_url":"https://api.github.com/users/marcandre/followers","following_url":"https://api.github.com/users/marcandre/following{/other_user}","gists_url":"https://api.github.com/users/marcandre/gists{/gist_id}","starred_url":"https://api.github.com/users/marcandre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcandre/subscriptions","organizations_url":"https://api.github.com/users/marcandre/orgs","repos_url":"https://api.github.com/users/marcandre/repos","events_url":"https://api.github.com/users/marcandre/events{/privacy}","received_events_url":"https://api.github.com/users/marcandre/received_events","type":"User","site_admin":false},"created_at":"2015-09-19T17:22:55Z","updated_at":"2015-09-19T17:22:55Z","body":"Now fixed, see #894"}}