{"action":"created","issue":{"url":"https://api.github.com/repos/neumino/rethinkdbdash/issues/75","labels_url":"https://api.github.com/repos/neumino/rethinkdbdash/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/neumino/rethinkdbdash/issues/75/comments","events_url":"https://api.github.com/repos/neumino/rethinkdbdash/issues/75/events","html_url":"https://github.com/neumino/rethinkdbdash/issues/75","id":63426469,"number":75,"title":"Strange behavior of type.array()","user":{"login":"zlls","id":5580710,"avatar_url":"https://avatars.githubusercontent.com/u/5580710?v=3","gravatar_id":"","url":"https://api.github.com/users/zlls","html_url":"https://github.com/zlls","followers_url":"https://api.github.com/users/zlls/followers","following_url":"https://api.github.com/users/zlls/following{/other_user}","gists_url":"https://api.github.com/users/zlls/gists{/gist_id}","starred_url":"https://api.github.com/users/zlls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zlls/subscriptions","organizations_url":"https://api.github.com/users/zlls/orgs","repos_url":"https://api.github.com/users/zlls/repos","events_url":"https://api.github.com/users/zlls/events{/privacy}","received_events_url":"https://api.github.com/users/zlls/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-21T16:52:30Z","updated_at":"2015-03-21T17:16:45Z","closed_at":null,"body":"I tried out this awesome library today, but I came across a strange behavior while validating arrays.\r\n\r\nSo I want an array with objects inside. Each Object should contain required keys (key2) and optional keys (key3). Here is an example:\r\n\r\n```javascript\r\n    var Test = thinky.createModel(\"Test\", {\r\n        // ...\r\n        \"test\": type.array().schema(\r\n            type.object().schema({\r\n                \"key1\": type.number(),\r\n                \"key2\": type.string().required(),\r\n                \"key3\": type.string().optional()\r\n            })\r\n        ).required()\r\n    });\r\n```\r\nIf I use ```type.array().schema( /* ... */ ).required()``` every key in the array is required. But if I use ```type.array().schema( /* ... */ )``` instead of ```type.array().schema( /* ... */ ).required()```, it ignores any ```.required()``` and ```.optional()``` inside the array.\r\n\r\nAm I misunderstanding how to use the validation or is it not just me?"},"comment":{"url":"https://api.github.com/repos/neumino/rethinkdbdash/issues/comments/84397812","html_url":"https://github.com/neumino/rethinkdbdash/issues/75#issuecomment-84397812","issue_url":"https://api.github.com/repos/neumino/rethinkdbdash/issues/75","id":84397812,"user":{"login":"neumino","id":1461947,"avatar_url":"https://avatars.githubusercontent.com/u/1461947?v=3","gravatar_id":"","url":"https://api.github.com/users/neumino","html_url":"https://github.com/neumino","followers_url":"https://api.github.com/users/neumino/followers","following_url":"https://api.github.com/users/neumino/following{/other_user}","gists_url":"https://api.github.com/users/neumino/gists{/gist_id}","starred_url":"https://api.github.com/users/neumino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neumino/subscriptions","organizations_url":"https://api.github.com/users/neumino/orgs","repos_url":"https://api.github.com/users/neumino/repos","events_url":"https://api.github.com/users/neumino/events{/privacy}","received_events_url":"https://api.github.com/users/neumino/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T17:16:45Z","updated_at":"2015-03-21T17:16:45Z","body":"Hello @zlls \r\n\r\nThis is a bug, I just opened https://github.com/neumino/thinky/issues/203 (wrong repository)\r\nI'll look into it"}}