{"action":"created","issue":{"url":"https://api.github.com/repos/json-schema-form/angular-schema-form/issues/805","repository_url":"https://api.github.com/repos/json-schema-form/angular-schema-form","labels_url":"https://api.github.com/repos/json-schema-form/angular-schema-form/issues/805/labels{/name}","comments_url":"https://api.github.com/repos/json-schema-form/angular-schema-form/issues/805/comments","events_url":"https://api.github.com/repos/json-schema-form/angular-schema-form/issues/805/events","html_url":"https://github.com/json-schema-form/angular-schema-form/issues/805","id":191042872,"number":805,"title":"Is there some way to require all fields in an object?","user":{"login":"Lorless","id":8771283,"avatar_url":"https://avatars.githubusercontent.com/u/8771283?v=3","gravatar_id":"","url":"https://api.github.com/users/Lorless","html_url":"https://github.com/Lorless","followers_url":"https://api.github.com/users/Lorless/followers","following_url":"https://api.github.com/users/Lorless/following{/other_user}","gists_url":"https://api.github.com/users/Lorless/gists{/gist_id}","starred_url":"https://api.github.com/users/Lorless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lorless/subscriptions","organizations_url":"https://api.github.com/users/Lorless/orgs","repos_url":"https://api.github.com/users/Lorless/repos","events_url":"https://api.github.com/users/Lorless/events{/privacy}","received_events_url":"https://api.github.com/users/Lorless/received_events","type":"User","site_admin":false},"labels":[{"id":355326763,"url":"https://api.github.com/repos/json-schema-form/angular-schema-form/labels/needs:%20demo%20(gist%20/%20plunker)","name":"needs: demo (gist / plunker)","color":"fad100","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-22T15:45:54Z","updated_at":"2016-11-23T05:54:24Z","closed_at":null,"body":"Is there some way to validate fields in an object that never have inputs associated with them? Im my example the model is set by a directive. \r\n\r\nThe docs don't explain much about how validation works on different field types. I've tried this: \r\n\r\n```\r\ncolourPicker1: {\r\n          type: \"object\",\r\n          properties: {\r\n            hex:{\r\n              type:\"string\"\r\n            },\r\n            rgba: {\r\n              type: \"string\"\r\n            }\r\n          },\r\n          required: [\r\n            \"hex\", \"rgba\"\r\n          ]\r\n        },\r\n```\r\n\r\nI've also tried custom validators but the validator is never even run on validate:\r\n\r\n**EDIT** I did not have schema-validate alongside my ng-model so my custom validators were not running. It seems however that changes to a field inside an object model do not trigger the customValidators. Neither does broadcasting schemaFormValidate\r\n\r\n**EDIT** With further investigation I concluded that custom validators do not deep watch objects and therefore will not trigger on a field change within an object. The hack to get around this is to angular.copy the whole model every time a change occurs. Not great.\r\n\r\n\r\nThis is a custom add on and its fairly complicated but I'm not sure it should matter. Surely if the model is blank like `colourPicker1 : {}`  or `colourPicker: {hex:'',rgba:''}` then the model will be used to detect that neither of the fields i want exist?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/json-schema-form/angular-schema-form/issues/comments/262439389","html_url":"https://github.com/json-schema-form/angular-schema-form/issues/805#issuecomment-262439389","issue_url":"https://api.github.com/repos/json-schema-form/angular-schema-form/issues/805","id":262439389,"user":{"login":"Anthropic","id":1182507,"avatar_url":"https://avatars.githubusercontent.com/u/1182507?v=3","gravatar_id":"","url":"https://api.github.com/users/Anthropic","html_url":"https://github.com/Anthropic","followers_url":"https://api.github.com/users/Anthropic/followers","following_url":"https://api.github.com/users/Anthropic/following{/other_user}","gists_url":"https://api.github.com/users/Anthropic/gists{/gist_id}","starred_url":"https://api.github.com/users/Anthropic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anthropic/subscriptions","organizations_url":"https://api.github.com/users/Anthropic/orgs","repos_url":"https://api.github.com/users/Anthropic/repos","events_url":"https://api.github.com/users/Anthropic/events{/privacy}","received_events_url":"https://api.github.com/users/Anthropic/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T05:54:24Z","updated_at":"2016-11-23T05:54:24Z","body":"@Lorless if required didn't work then I am not sure why not. Can you make a plunker?"}}
{"actor":{"display_login":"Anthropic"}}