{"action":"created","issue":{"url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4126","labels_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4126/labels{/name}","comments_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4126/comments","events_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4126/events","html_url":"https://github.com/bcit-ci/CodeIgniter/pull/4126","id":107418242,"number":4126,"title":"Persist config file settings when resetting form_validation","user":{"login":"zoaked","id":10800710,"avatar_url":"https://avatars.githubusercontent.com/u/10800710?v=3","gravatar_id":"","url":"https://api.github.com/users/zoaked","html_url":"https://github.com/zoaked","followers_url":"https://api.github.com/users/zoaked/followers","following_url":"https://api.github.com/users/zoaked/following{/other_user}","gists_url":"https://api.github.com/users/zoaked/gists{/gist_id}","starred_url":"https://api.github.com/users/zoaked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoaked/subscriptions","organizations_url":"https://api.github.com/users/zoaked/orgs","repos_url":"https://api.github.com/users/zoaked/repos","events_url":"https://api.github.com/users/zoaked/events{/privacy}","received_events_url":"https://api.github.com/users/zoaked/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-20T21:17:54Z","updated_at":"2015-09-21T05:12:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bcit-ci/CodeIgniter/pulls/4126","html_url":"https://github.com/bcit-ci/CodeIgniter/pull/4126","diff_url":"https://github.com/bcit-ci/CodeIgniter/pull/4126.diff","patch_url":"https://github.com/bcit-ci/CodeIgniter/pull/4126.patch"},"body":"When checking multiple arrays using form_validation you have to call reset_validation between each separate check due to the instance of the library being a singleton.  The issue comes in when the settings are loaded from a config file as they are initially loaded from a parameter in the constructor, but are set to an empty array when resetting the class.  To get around this issue a copy of the config parameter is made and then the copy is used to reset the rules when clearing."},"comment":{"url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/comments/141879472","html_url":"https://github.com/bcit-ci/CodeIgniter/pull/4126#issuecomment-141879472","issue_url":"https://api.github.com/repos/bcit-ci/CodeIgniter/issues/4126","id":141879472,"user":{"login":"jim-parry","id":3203951,"avatar_url":"https://avatars.githubusercontent.com/u/3203951?v=3","gravatar_id":"","url":"https://api.github.com/users/jim-parry","html_url":"https://github.com/jim-parry","followers_url":"https://api.github.com/users/jim-parry/followers","following_url":"https://api.github.com/users/jim-parry/following{/other_user}","gists_url":"https://api.github.com/users/jim-parry/gists{/gist_id}","starred_url":"https://api.github.com/users/jim-parry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jim-parry/subscriptions","organizations_url":"https://api.github.com/users/jim-parry/orgs","repos_url":"https://api.github.com/users/jim-parry/repos","events_url":"https://api.github.com/users/jim-parry/events{/privacy}","received_events_url":"https://api.github.com/users/jim-parry/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T05:12:52Z","updated_at":"2015-09-21T05:12:52Z","body":"Getting better :)\r\n\r\nThis isn't a bug ... your PR was originally described as an enhancement. In that case, the changelog entry would be a new feature, not a bug fix.\r\n\r\nIIRC, a bug fix reference would be for an issue # previously reported, not for a problem with the PR itself.\r\n\r\nI find your user guide additions confusing ...\r\n1) You insist on passing TRUE, above line 717. This is opinion, not direction.\r\n2) \" This parameter must be true if your rules are being loaded from a config file\" ... er, isn't your point to provide optional keeping of config rules? This suggests that the only reasonable value is TRUE if you have a config file. That is opinion, rather than direction.\r\n3) The class reference for the method, lines 1079+ in the original .rst, need to be corrected as well.\r\n\r\nFinally, your PR is not signed ... this is mentioned at the bottom of http://www.codeigniter.com/user_guide/contributing/index.html\r\n"}}