{"action":"created","issue":{"url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/565","repository_url":"https://api.github.com/repos/1000hz/bootstrap-validator","labels_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/565/comments","events_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/565/events","html_url":"https://github.com/1000hz/bootstrap-validator/issues/565","id":240916427,"number":565,"title":"invalid.bs.validator fires but valid.bs.validator does not fire","user":{"login":"MinThaMie","id":5811560,"avatar_url":"https://avatars1.githubusercontent.com/u/5811560?v=3","gravatar_id":"","url":"https://api.github.com/users/MinThaMie","html_url":"https://github.com/MinThaMie","followers_url":"https://api.github.com/users/MinThaMie/followers","following_url":"https://api.github.com/users/MinThaMie/following{/other_user}","gists_url":"https://api.github.com/users/MinThaMie/gists{/gist_id}","starred_url":"https://api.github.com/users/MinThaMie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MinThaMie/subscriptions","organizations_url":"https://api.github.com/users/MinThaMie/orgs","repos_url":"https://api.github.com/users/MinThaMie/repos","events_url":"https://api.github.com/users/MinThaMie/events{/privacy}","received_events_url":"https://api.github.com/users/MinThaMie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-06T10:44:28Z","updated_at":"2017-07-10T19:45:06Z","closed_at":"2017-07-10T19:45:06Z","body":"I use to following code to make a save button disabled if the form is not valid. However, the first function behaves correct, but the second function doesn't. And I don't know why! I also tried to listen on `$('#telephoneForm')` but that broke also the invalid.\r\n**JavaScript**\r\n```\r\n$('#telephoneNumber').on('invalid.bs.validator', function(){\r\n\t\t\tconsole.log(\"invalid\");\r\n\t\t\t$('.edit-phonenumber').prop('disabled', true);\r\n\t\t});\r\n\r\n\t\t$('#telephoneNumber').on('valid.bs.validator', function(){\r\n\t\t\tconsole.log(\"valid\");\r\n\t\t\t$('.edit-phonenumber').prop('disabled', false);\r\n\t\t});\r\n```\r\n**HTML/Mustache**\r\n```\r\n<form class=\"form-horizontal\" id=\"telephoneForm\">\r\n\t<div class=\"form-group\">\r\n\t\t<div class=\"col-sm-10\">\r\n\t\t\t<input class=\"form-control\" id=\"telephoneNumber\"\r\n                                name=\"telephoneNumber\"\r\n\t\t\t\tpattern=\"^((\\d{2})-(\\d{8}))|((\\d{3})-(\\d{7}))|((\\d{4})-(\\d{6})|(\\d{10}))$\"\r\n\t\t\t\trequired readonly\r\n\t\t\t        data-error=\"Je telefoonnummer moet bestaan uit 10 cijfers en mag een koppelstreepje (-) bevatten\"\r\n\t\t\t\tvalue={{user.telephoneNumber}} >\r\n\t\t\t<div class=\"help-block with-errors\"></div>\r\n\t\t</div>\r\n\t\t<div class=\"col-sm-2\">\r\n\t\t\t<button type=\"button\" class=\"btn btn-default edit-phonenumber\">\r\n\t\t\t<span id=\"edit-icon\" class=\"fa fa-pencil\"></span></button>\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n```"},"comment":{"url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/comments/314213968","html_url":"https://github.com/1000hz/bootstrap-validator/issues/565#issuecomment-314213968","issue_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/565","id":314213968,"user":{"login":"1000hz","id":1395018,"avatar_url":"https://avatars0.githubusercontent.com/u/1395018?v=3","gravatar_id":"","url":"https://api.github.com/users/1000hz","html_url":"https://github.com/1000hz","followers_url":"https://api.github.com/users/1000hz/followers","following_url":"https://api.github.com/users/1000hz/following{/other_user}","gists_url":"https://api.github.com/users/1000hz/gists{/gist_id}","starred_url":"https://api.github.com/users/1000hz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1000hz/subscriptions","organizations_url":"https://api.github.com/users/1000hz/orgs","repos_url":"https://api.github.com/users/1000hz/repos","events_url":"https://api.github.com/users/1000hz/events{/privacy}","received_events_url":"https://api.github.com/users/1000hz/received_events","type":"User","site_admin":false},"created_at":"2017-07-10T19:45:06Z","updated_at":"2017-07-10T19:45:06Z","body":"Make your button `type=\"submit\"` instead. Disabling the button will be handled automatically for you."}}
{"actor":{"display_login":"1000hz"}}