{"action":"opened","issue":{"url":"https://api.github.com/repos/formvalidation/support/issues/573","repository_url":"https://api.github.com/repos/formvalidation/support","labels_url":"https://api.github.com/repos/formvalidation/support/issues/573/labels{/name}","comments_url":"https://api.github.com/repos/formvalidation/support/issues/573/comments","events_url":"https://api.github.com/repos/formvalidation/support/issues/573/events","html_url":"https://github.com/formvalidation/support/issues/573","id":150922063,"number":573,"title":"Max call stack exceeded","user":{"login":"BobBuford","id":6683403,"avatar_url":"https://avatars.githubusercontent.com/u/6683403?v=3","gravatar_id":"","url":"https://api.github.com/users/BobBuford","html_url":"https://github.com/BobBuford","followers_url":"https://api.github.com/users/BobBuford/followers","following_url":"https://api.github.com/users/BobBuford/following{/other_user}","gists_url":"https://api.github.com/users/BobBuford/gists{/gist_id}","starred_url":"https://api.github.com/users/BobBuford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BobBuford/subscriptions","organizations_url":"https://api.github.com/users/BobBuford/orgs","repos_url":"https://api.github.com/users/BobBuford/repos","events_url":"https://api.github.com/users/BobBuford/events{/privacy}","received_events_url":"https://api.github.com/users/BobBuford/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-25T16:44:50Z","updated_at":"2016-04-25T16:44:50Z","closed_at":null,"body":"I have a web page that has on it 2 textarea fields that I need to validate as having between 1 and 255 characters whenever that field is exposed.  Each field has a href link to click to show or hide the field.  The validation on each field is to be enabled when the field is shown, disabled when the field is hidden.\r\n\r\nWith the FormValidation methods commented out, this performs as expected with no errors.  When FV methods are enabled, this error occurs.  I'm not able to tell where in my code the problem exists - Screenshots are attached of the errors.\r\n\r\nThe single code file is attached.  The form ID line is\r\n\r\n                    <form id=\"giftgiveform\">\r\n\r\nThe textarea code is:  \r\n\r\n                                <div class=\"panel panel-default give-modal-panel\">\r\n                                <div class=\"panel-heading\">Optional Comments</div>\r\n                                <div class=\"panel-body\">\r\n                                    <ul class=\"list-unstyled\">\r\n                                        <li>\r\n                                            <a href=\"#staff-comments\" class=\"commentLink\"\r\n                                               onclick=\"toggle_visibility('staffComments')\">Include a message for\r\n                                                {Recipient}</a>\r\n                                        <textarea rows=\"3\" name=\"staffComments\" id=\"staff-comments\"\r\n                                                  class=\"staff-comments give-modal-comments\"\r\n                                                  style=\"display:none\" title=\"Staff Comments\"></textarea>\r\n                                        </li>\r\n                                        <li>\r\n                                            <a href=\"#cru-comments\" class=\"commentLink\"\r\n                                               onclick=\"toggle_visibility('cruComments')\">Include a message for\r\n                                                Donation Services</a>\r\n                                        <textarea rows=\"3\" name=\"cruComments\" id=\"cru-comments\"\r\n                                                  class=\"cru-comments give-modal-comments\"\r\n                                                  style=\"display:none\" title=\"Cru Comments\"></textarea>\r\n                                        </li>\r\n                                    </ul>\r\n                                </div><!-- // panel-body -->\r\n                            </div><!-- // panel -->\r\n\r\nand the script in the HTML file is:\r\n\r\n    <script>\r\n\r\n    function toggle_visibility(id) {\r\n        var e = document.getElementById(id);\r\n        var eName = e.name;\r\n//        console.log(e.type);\r\n        if (e.style.display == 'block') {\r\n            e.style.display = 'none';\r\n            $('#giftgiveform').formValidation('enableFieldValidators', eName, false);\r\n        } else {\r\n            e.style.display = 'block';\r\n            $('#giftgiveform').formValidation('enableFieldValidators', eName, true);\r\n        }\r\n        console.log(e.id + ': ' + e.style.display + ': ' + eName);\r\n    }\r\n\r\n    $(document).ready(function () {\r\n        $('#giftgiveform')\r\n                .formValidation({\r\n                    framework: 'bootstrap',\r\n                    icon: {\r\n                        valid: 'glyphicon glyphicon-ok',\r\n                        invalid: 'glyphicon glyphicon-remove',\r\n                        validating: 'glyphicon glyphicon-refresh'\r\n                    },\r\n                    fields: {\r\n                        staffComments: {\r\n                            enabled: false,\r\n                            validators: {\r\n                                stringLength: {\r\n                                    min: 1,\r\n                                    max: 250,\r\n                                    message: 'This comment must be between 1 and 250 comments.'\r\n                                }\r\n                            }\r\n                        },\r\n                        cruComments: {\r\n                            enabled: false,\r\n                            validators: {\r\n                                stringLength: {\r\n                                    min: 1,\r\n                                    max: 250,\r\n                                    message: 'This comment must be between 1 and 250 comments.'\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                });\r\n    });\r\n\r\n</script>\r\n\r\nThe error reports, expanded, are:  \r\n![screen shot 2016-04-25 at 12 35 50 pm](https://cloud.githubusercontent.com/assets/6683403/14791238/02e8508a-0ae3-11e6-9d10-0b409084fbd6.png)\r\n\r\nand the line with the 2nd error is shown here:  \r\n![screen shot 2016-04-25 at 12 33 12 pm](https://cloud.githubusercontent.com/assets/6683403/14791270/2099eec2-0ae3-11e6-8688-dc8db92e9407.png)\r\n\r\nand finally, the HTML file, including the JS script, is:  \r\n[component.html.zip](https://github.com/formvalidation/support/files/234970/component.html.zip)\r\n\r\nThank you\r\n"}}