{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/7372","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7372/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7372/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7372/events","html_url":"https://github.com/joomla/joomla-cms/pull/7372","id":93628200,"number":7372,"title":"Fixed required multiple field which is empty","user":{"login":"bembelimen","id":1229869,"avatar_url":"https://avatars.githubusercontent.com/u/1229869?v=3","gravatar_id":"","url":"https://api.github.com/users/bembelimen","html_url":"https://github.com/bembelimen","followers_url":"https://api.github.com/users/bembelimen/followers","following_url":"https://api.github.com/users/bembelimen/following{/other_user}","gists_url":"https://api.github.com/users/bembelimen/gists{/gist_id}","starred_url":"https://api.github.com/users/bembelimen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bembelimen/subscriptions","organizations_url":"https://api.github.com/users/bembelimen/orgs","repos_url":"https://api.github.com/users/bembelimen/repos","events_url":"https://api.github.com/users/bembelimen/events{/privacy}","received_events_url":"https://api.github.com/users/bembelimen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/joomla/joomla-cms/milestones/11","html_url":"https://github.com/joomla/joomla-cms/milestones/Joomla!%203.4.6","labels_url":"https://api.github.com/repos/joomla/joomla-cms/milestones/11/labels","id":1269516,"number":11,"title":"Joomla! 3.4.6","description":"","creator":{"login":"zero-24","id":2596554,"avatar_url":"https://avatars.githubusercontent.com/u/2596554?v=3","gravatar_id":"","url":"https://api.github.com/users/zero-24","html_url":"https://github.com/zero-24","followers_url":"https://api.github.com/users/zero-24/followers","following_url":"https://api.github.com/users/zero-24/following{/other_user}","gists_url":"https://api.github.com/users/zero-24/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-24/subscriptions","organizations_url":"https://api.github.com/users/zero-24/orgs","repos_url":"https://api.github.com/users/zero-24/repos","events_url":"https://api.github.com/users/zero-24/events{/privacy}","received_events_url":"https://api.github.com/users/zero-24/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":98,"state":"open","created_at":"2015-08-24T14:19:20Z","updated_at":"2015-10-23T14:52:05Z","due_on":null,"closed_at":null},"comments":26,"created_at":"2015-07-07T21:01:29Z","updated_at":"2015-10-24T09:10:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7372","html_url":"https://github.com/joomla/joomla-cms/pull/7372","diff_url":"https://github.com/joomla/joomla-cms/pull/7372.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/7372.patch"},"body":"If you submit an empty multiple field, the JForm::filter method set's the value to an array:\r\nhttps://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/form.php#L251\r\nAnd now the JForm::validateField doesn't recognize it as empty:\r\nhttps://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/form.php#L1962\r\n\r\nThe patch will fix that\r\n\r\nHow to test:\r\n\r\n- open the XML file administrator/components/com_content/models/forms/article.xml\r\n- add the following field: ```<field name=\"foobar\" multiple=\"true\" required=\"true\" />```\r\n- Create an article, add an title and try to save\r\n\r\nExpected result: Joomla! complains about the required field \"foobar\" (because we didn't send it)\r\nCurrent result: article could be saved\r\n\r\n- Apply path\r\n- try again"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/150778284","html_url":"https://github.com/joomla/joomla-cms/pull/7372#issuecomment-150778284","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7372","id":150778284,"user":{"login":"designbengel","id":828371,"avatar_url":"https://avatars.githubusercontent.com/u/828371?v=3","gravatar_id":"","url":"https://api.github.com/users/designbengel","html_url":"https://github.com/designbengel","followers_url":"https://api.github.com/users/designbengel/followers","following_url":"https://api.github.com/users/designbengel/following{/other_user}","gists_url":"https://api.github.com/users/designbengel/gists{/gist_id}","starred_url":"https://api.github.com/users/designbengel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/designbengel/subscriptions","organizations_url":"https://api.github.com/users/designbengel/orgs","repos_url":"https://api.github.com/users/designbengel/repos","events_url":"https://api.github.com/users/designbengel/events{/privacy}","received_events_url":"https://api.github.com/users/designbengel/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T09:10:26Z","updated_at":"2015-10-24T09:10:26Z","body":"I have tested this item :red_circle: unsuccessfully on 4886723010eeb00d968842dd0d7787c4267daa18<br /><br />unsuccessful because it works also without the patch<hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"http://issues.joomla.org/tracker/joomla-cms/7372\">issues.joomla.org/joomla-cms/7372</a>.</sub>"}}