{"action":"created","issue":{"url":"https://api.github.com/repos/Textalk/angular-schema-form/issues/365","labels_url":"https://api.github.com/repos/Textalk/angular-schema-form/issues/365/labels{/name}","comments_url":"https://api.github.com/repos/Textalk/angular-schema-form/issues/365/comments","events_url":"https://api.github.com/repos/Textalk/angular-schema-form/issues/365/events","html_url":"https://github.com/Textalk/angular-schema-form/issues/365","id":69833779,"number":365,"title":"Async Validator not called?","user":{"login":"PhilBroadbent","id":7779879,"avatar_url":"https://avatars.githubusercontent.com/u/7779879?v=3","gravatar_id":"","url":"https://api.github.com/users/PhilBroadbent","html_url":"https://github.com/PhilBroadbent","followers_url":"https://api.github.com/users/PhilBroadbent/followers","following_url":"https://api.github.com/users/PhilBroadbent/following{/other_user}","gists_url":"https://api.github.com/users/PhilBroadbent/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilBroadbent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilBroadbent/subscriptions","organizations_url":"https://api.github.com/users/PhilBroadbent/orgs","repos_url":"https://api.github.com/users/PhilBroadbent/repos","events_url":"https://api.github.com/users/PhilBroadbent/events{/privacy}","received_events_url":"https://api.github.com/users/PhilBroadbent/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-21T12:29:22Z","updated_at":"2015-05-08T17:04:17Z","closed_at":null,"body":"Hi, as per my question on SO Im having problems with validation.\r\nIn that case I don't have any specical validation, and am just leaving it up to schema-validate however it doens't behavior as i'd expect. \r\nI've tried to look into using custom validation, but Async validator doesn't seem to get called on my custom component. \r\n\r\nI crudely add asyncValidator into formDefinition like so:\r\n\r\n\r\n      data.formDefinition[3][0].validationMessage = {\r\n        'async': \"Woah that number is too big!\"\r\n      };\r\n\r\n      data.formDefinition[3][0].$asyncValidators ={\r\n        'async': function(stopprice) {\r\n          window.alert(\"blahblah\");\r\n          var deferred = $q.defer();\r\n          $timeout(function(){\r\n            if (angular.isNumber(stopprice) || stopprice > 20) {\r\n              deferred.reject();\r\n            } else {\r\n              deferred.resolve();\r\n            }\r\n          }, 500);\r\n          return deferred.promise;\r\n        }\r\n      };\r\n\r\nThe example in my SO question is a bit outdated, and I now have the dropdown and 2 fields which should be numbers (to allow for range search) - only one of the fields seems to get validated (and shows my custom message above) , the other field is not validated, and neither call the $asyncValidators? \r\n\r\n![image](https://cloud.githubusercontent.com/assets/7779879/7252574/5091963a-e82e-11e4-9724-c32bfe348175.png)\r\n\r\nCan you please advise?"},"comment":{"url":"https://api.github.com/repos/Textalk/angular-schema-form/issues/comments/100299711","html_url":"https://github.com/Textalk/angular-schema-form/issues/365#issuecomment-100299711","issue_url":"https://api.github.com/repos/Textalk/angular-schema-form/issues/365","id":100299711,"user":{"login":"PhilBroadbent","id":7779879,"avatar_url":"https://avatars.githubusercontent.com/u/7779879?v=3","gravatar_id":"","url":"https://api.github.com/users/PhilBroadbent","html_url":"https://github.com/PhilBroadbent","followers_url":"https://api.github.com/users/PhilBroadbent/followers","following_url":"https://api.github.com/users/PhilBroadbent/following{/other_user}","gists_url":"https://api.github.com/users/PhilBroadbent/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilBroadbent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilBroadbent/subscriptions","organizations_url":"https://api.github.com/users/PhilBroadbent/orgs","repos_url":"https://api.github.com/users/PhilBroadbent/repos","events_url":"https://api.github.com/users/PhilBroadbent/events{/privacy}","received_events_url":"https://api.github.com/users/PhilBroadbent/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T17:04:17Z","updated_at":"2015-05-08T17:04:17Z","body":"Sorry for slow respones David. I have not started work on this task yet so haven't looked into it.  \r\nThese solutions look pretty complicated! 1 is probably what I'll have to do,  4 seems okay but still confused by 2 and 3.\r\n\r\n2) Not sure how entire object would have a model - if the other parts have a separate model, then when you insert any data the \"entire object model\" won't get updated at all....I will have to try.\r\n3) By slot i mean one form element.  Take this picture for example. You can see that Transaction Time takes up 1 \"slot\", then Stop price takes up another \"slot\", but it is split up into a 25% dropdown, and 75% input field...and in the one in my original message, the sections take up 33% of a slot. So I meant instead of being just 1 slot split up, it would take up several surely\r\n![image](https://cloud.githubusercontent.com/assets/7779879/7516209/82d388c6-f4c5-11e4-9d4d-c8838814339d.png)\r\n"}}