{"action":"closed","issue":{"url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/266","repository_url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder","labels_url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/266/comments","events_url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/266/events","html_url":"https://github.com/mistic100/jQuery-QueryBuilder/issues/266","id":143713136,"number":266,"title":"QueryBuilder should have an option to not cause a validation error when there are no fields","user":{"login":"timgws","id":1050232,"avatar_url":"https://avatars.githubusercontent.com/u/1050232?v=3","gravatar_id":"","url":"https://api.github.com/users/timgws","html_url":"https://github.com/timgws","followers_url":"https://api.github.com/users/timgws/followers","following_url":"https://api.github.com/users/timgws/following{/other_user}","gists_url":"https://api.github.com/users/timgws/gists{/gist_id}","starred_url":"https://api.github.com/users/timgws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgws/subscriptions","organizations_url":"https://api.github.com/users/timgws/orgs","repos_url":"https://api.github.com/users/timgws/repos","events_url":"https://api.github.com/users/timgws/events{/privacy}","received_events_url":"https://api.github.com/users/timgws/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-26T14:54:46Z","updated_at":"2016-03-26T14:56:00Z","closed_at":"2016-03-26T14:56:00Z","body":"I write a PHP library for parsing QueryBuilder rules into database queries on the server side.\r\n\r\nWe recently came across a new PR where QueryBuilder instances without any rules would throw a validation error[[1]](https://github.com/timgws/QueryBuilderParser/pull/8#issuecomment-201840380).\r\n\r\nThis can be skipped with code similar to this:\r\n\r\n```js\r\n$('#query-builder').on('validationError.queryBuilder', function(e){\r\n    e.preventDefault();\r\n});\r\n```\r\n\r\nHowever, I think it would be better if this was an option that could be set where an instance of QueryBuilder would not throw a validation error when there were no rules configured."}}