{"action":"created","issue":{"url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6519","repository_url":"https://api.github.com/repos/wet-boew/wet-boew","labels_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6519/labels{/name}","comments_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6519/comments","events_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6519/events","html_url":"https://github.com/wet-boew/wet-boew/issues/6519","id":57602713,"number":6519,"title":"Form Validation and Tab interface: How to add a custom validation method?","user":{"login":"spacejang","id":10981966,"avatar_url":"https://avatars.githubusercontent.com/u/10981966?v=3","gravatar_id":"","url":"https://api.github.com/users/spacejang","html_url":"https://github.com/spacejang","followers_url":"https://api.github.com/users/spacejang/followers","following_url":"https://api.github.com/users/spacejang/following{/other_user}","gists_url":"https://api.github.com/users/spacejang/gists{/gist_id}","starred_url":"https://api.github.com/users/spacejang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacejang/subscriptions","organizations_url":"https://api.github.com/users/spacejang/orgs","repos_url":"https://api.github.com/users/spacejang/repos","events_url":"https://api.github.com/users/spacejang/events{/privacy}","received_events_url":"https://api.github.com/users/spacejang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wet-boew/wet-boew/labels/Going%20Stale","name":"Going Stale","color":"e11d21"},{"url":"https://api.github.com/repos/wet-boew/wet-boew/labels/Plugin:%20Form%20Validation%20(jQuery%20Validation)","name":"Plugin: Form Validation (jQuery Validation)","color":"006b75"},{"url":"https://api.github.com/repos/wet-boew/wet-boew/labels/Plugin:%20Tabbed%20Interface/Carousel","name":"Plugin: Tabbed Interface/Carousel","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-02-13T14:11:04Z","updated_at":"2016-02-12T14:58:38Z","closed_at":null,"body":"Hi there,\r\n\r\nI have a form inside Tabbed interface.\r\n1. custom validation method works if the form is without Tabbed interface. however the following code does not work.\r\n```html\r\n<div class=\"wb-tabs\">\r\n\t<div class=\"tabpanels\">\r\n\t\t<details id=\"details-panel1\">\r\n\t\t\t<summary>Test Search</summary>\r\n\t\t\t<div class=\"wb-frmvld\">\r\n\t\t\t\t<form name=\"\" action=\"searchResult-en.html\" method=\"get\" class=\"form-horizontal\" id=\"Reports\">\r\n\t\t\t\t\t<div class=\"panel panel-default\">\r\n\t\t\t\t\t\t<div class=\"panel-heading\">\r\n\t\t\t\t\t\t  <h2 class=\"panel-title\">Test Search</h2>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"panel-body\">\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"col-sm-3 control-label\">\r\n\t\t\t\t\t\t\t\t\t<label>Report Start Date:</label>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"col-sm-9\">\r\n\t\t\t\t\t\t\t\t\t<label for=\"startDate\" style=\"font-weight: normal;\">Start Date<span class=\"datepicker-format\"> (<abbr title=\"Four digits year, dash, two digits month, dash, two digits day\">YYYY-MM-DD</abbr>)</span></label>\r\n\t\t\t\t\t\t\t\t\t<input class=\"form-control\" type=\"date\" id=\"startDate\" name=\"startDate\" min=\"2011-11-24\" />\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<div class=\"col-sm-3 control-label\">\r\n\t\t\t\t\t\t\t\t  <label class=\"wb-inv\">Report Start Date</label>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"col-sm-9\">\r\n\t\t\t\t\t\t\t\t\t<label for=\"endDate\" style=\"font-weight: normal;\">End Date<span class=\"datepicker-format\"> (<abbr title=\"Four digits year, dash, two digits month, dash, two digits day\">YYYY-MM-DD</abbr>)</span></label>\r\n\t\t\t\t\t\t\t\t\t<input class=\"form-control maxDate\" type=\"date\" id=\"endDate\" name=\"endDate\" min=\"2011-11-24\" />\r\n\t\t\t\t\t\t\t   </div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</form>\r\n\t\t\t</div>\r\n\t\t</details>\r\n\t</div>\r\n</div>\r\n```\r\n```javascript\r\n$(\".wb-frmvld\").on(\"wb-ready.wb-frmvld\", function (event) {\r\n\r\n        $.validator.addMethod(\"beforeDate\", function (value, element, param) {\r\n            return this.optional(element) || (($(param).val() === '') ? false : (value >= $(param).val()));\r\n        }, \"Please enter a EndDate greater than or equal to StartDate\");\r\n\r\n        var now = new Date();\r\n        var day = (now.getDate() < 10 ? '0' : '') + now.getDate();\r\n        var month = ((now.getMonth() + 1) < 10 ? '0' : '') + (now.getMonth() + 1);\r\n        var year = now.getFullYear();\r\n        var todayDate = year + \"-\" + month + \"-\" + day;\r\n\r\n        $(\"#endDate\").rules(\"add\", {\r\n            beforeDate: \"#startDate\",\r\n            max: todayDate\r\n        });\r\n\r\n        $(\"#startDate\").rules(\"add\", {\r\n            max: todayDate\r\n        });\r\n});\r\n```\r\n\r\nit would be greatly appreciated if you could help.Thanks"},"comment":{"url":"https://api.github.com/repos/wet-boew/wet-boew/issues/comments/183362187","html_url":"https://github.com/wet-boew/wet-boew/issues/6519#issuecomment-183362187","issue_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6519","id":183362187,"user":{"login":"hsrudnicki","id":8570320,"avatar_url":"https://avatars.githubusercontent.com/u/8570320?v=3","gravatar_id":"","url":"https://api.github.com/users/hsrudnicki","html_url":"https://github.com/hsrudnicki","followers_url":"https://api.github.com/users/hsrudnicki/followers","following_url":"https://api.github.com/users/hsrudnicki/following{/other_user}","gists_url":"https://api.github.com/users/hsrudnicki/gists{/gist_id}","starred_url":"https://api.github.com/users/hsrudnicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsrudnicki/subscriptions","organizations_url":"https://api.github.com/users/hsrudnicki/orgs","repos_url":"https://api.github.com/users/hsrudnicki/repos","events_url":"https://api.github.com/users/hsrudnicki/events{/privacy}","received_events_url":"https://api.github.com/users/hsrudnicki/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T14:58:38Z","updated_at":"2016-02-12T14:58:38Z","body":" Is this still an issue waiting for an answer from @spacejang? Either way, please update the status of this issue, whether this issue can closed as resolved/fixed or otherwise, thank you"}}