{"action":"closed","issue":{"url":"https://api.github.com/repos/copleykj/meteor-shower/issues/66","repository_url":"https://api.github.com/repos/copleykj/meteor-shower","labels_url":"https://api.github.com/repos/copleykj/meteor-shower/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/copleykj/meteor-shower/issues/66/comments","events_url":"https://api.github.com/repos/copleykj/meteor-shower/issues/66/events","html_url":"https://github.com/copleykj/meteor-shower/issues/66","id":155343148,"number":66,"title":"Meteor method not being called","user":{"login":"szimmers","id":715824,"avatar_url":"https://avatars2.githubusercontent.com/u/715824?v=3","gravatar_id":"","url":"https://api.github.com/users/szimmers","html_url":"https://github.com/szimmers","followers_url":"https://api.github.com/users/szimmers/followers","following_url":"https://api.github.com/users/szimmers/following{/other_user}","gists_url":"https://api.github.com/users/szimmers/gists{/gist_id}","starred_url":"https://api.github.com/users/szimmers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szimmers/subscriptions","organizations_url":"https://api.github.com/users/szimmers/orgs","repos_url":"https://api.github.com/users/szimmers/repos","events_url":"https://api.github.com/users/szimmers/events{/privacy}","received_events_url":"https://api.github.com/users/szimmers/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-05-17T19:35:23Z","updated_at":"2017-07-05T20:31:30Z","closed_at":"2017-07-05T20:31:30Z","body":"i have a simple form w/ a username. client-side validation works fine, but i am unable to get my server-side method called. it's totally possible i did something wrong, but i think i've followed the docs correctly.\n\nJS file served to both client and server:\n\n```\nShower({\n    name: \"usernameRegisterForm\",\n    method: \"foobar\",\n    fields: {\n        username: {\n            required: true,\n            message: \"Username can have letters and/or numbers, between 4 and 20 characters.\",\n            format: /^[A-Z0-9]{4,20}$/i,\n            transform: [\"trim\"]\n        }\n    }\n});\n```\n\nMeteor method, never called:\n\n```\n    'foobar': function (rawFormData, templateData) {\n        console.log('rawFormData', rawFormData);\n        console.log('templateData', templateData);\n    },\n```\n\nclient JS code:\n\n```\nTemplate.SetUsername.events({\n    'click #submitbutton': function (event) {\n        event.preventDefault();\n\n        var rawFormData = {\n            username: username.value\n        };\n\n        Shower.usernameRegisterForm.validate(rawFormData, function(errors) {\n            if (errors) {\n                alert(errors.username.message);\n            }\n        });\n    }\n});\n```\n"}}
{"actor":{"display_login":"copleykj"}}