{"action":"created","issue":{"url":"https://api.github.com/repos/vazco/uniforms/issues/113","repository_url":"https://api.github.com/repos/vazco/uniforms","labels_url":"https://api.github.com/repos/vazco/uniforms/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/vazco/uniforms/issues/113/comments","events_url":"https://api.github.com/repos/vazco/uniforms/issues/113/events","html_url":"https://github.com/vazco/uniforms/issues/113","id":183266406,"number":113,"title":"Multiselect with checkboxes validation issue ","user":{"login":"mattscooter","id":16009490,"avatar_url":"https://avatars.githubusercontent.com/u/16009490?v=3","gravatar_id":"","url":"https://api.github.com/users/mattscooter","html_url":"https://github.com/mattscooter","followers_url":"https://api.github.com/users/mattscooter/followers","following_url":"https://api.github.com/users/mattscooter/following{/other_user}","gists_url":"https://api.github.com/users/mattscooter/gists{/gist_id}","starred_url":"https://api.github.com/users/mattscooter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattscooter/subscriptions","organizations_url":"https://api.github.com/users/mattscooter/orgs","repos_url":"https://api.github.com/users/mattscooter/repos","events_url":"https://api.github.com/users/mattscooter/events{/privacy}","received_events_url":"https://api.github.com/users/mattscooter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vazco/uniforms/labels/bug","name":"bug","color":"ee0701"}],"state":"open","locked":false,"assignee":{"login":"radekmie","id":1379064,"avatar_url":"https://avatars.githubusercontent.com/u/1379064?v=3","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false},"assignees":[{"login":"radekmie","id":1379064,"avatar_url":"https://avatars.githubusercontent.com/u/1379064?v=3","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-10-16T13:14:22Z","updated_at":"2016-10-16T16:19:11Z","closed_at":null,"body":"I am currently evaluating uniforms for my project and I've run into a problem with multiselect checkbox using the bootstrap 3 library.\r\n\r\nIn my schema I have a field defined as a String Array with allowed values of \"one\", \"two\", \"three\".  I want to be able to select multiple options.\r\n\r\n\r\n```\r\nmultiselect: {\r\n    type: [String],\r\n    label: 'Multi Select',\r\n    minCount: 1,\r\n    allowedValues: [\"one\",\"two\",\"three\"],    \r\n}\r\n```\r\n\r\nI am using an autoform and autofield and I haven't specified any additional properties.\r\n\r\nThe field is correctly being rendered as a multiselect with check boxes for each option, however when I submit the form I am getting a validation error saying that the field must be an array.  \r\n\r\nI also tried getting rid of the allowed values and just use the uniforms: options in the field definition hoping it would make a difference:\r\n\r\n```\r\n  multiselect: {\r\n    type: [String],\r\n    label: 'Multi Select',\r\n    minCount: 1,    \r\n    uniforms: {\r\n      options: [{ label: \"supplier\", value: \"sup\"}, {label: \"client\", value:\"cli\"},{label: \"other\", value:\"oth\"}],\r\n    }\r\n```\r\n\r\nThis time the fields appear to render correctly with the correct labels, however I am still getting the same error - \"Multi Select must be an array\".\r\n\r\nAm I doing something wrong or is the component not mapping the data for the field correctly?  Do I need to do a custom transform on the data to make it an array?  If so, how?\r\n\r\n\r\n \r\n "},"comment":{"url":"https://api.github.com/repos/vazco/uniforms/issues/comments/254056556","html_url":"https://github.com/vazco/uniforms/issues/113#issuecomment-254056556","issue_url":"https://api.github.com/repos/vazco/uniforms/issues/113","id":254056556,"user":{"login":"radekmie","id":1379064,"avatar_url":"https://avatars.githubusercontent.com/u/1379064?v=3","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false},"created_at":"2016-10-16T16:19:11Z","updated_at":"2016-10-16T16:19:11Z","body":"I've got two ideas on how to get rid of this `null`:\r\n\r\n0. Pass `model={{multiselect: []}}` - it will bypass the `defaultValue` algorithm.\r\n0. Use `autoValue` to filter out all `null`s _(and other invalid values)_."}}
{"actor":{"display_login":"radekmie"}}