{"action":"closed","number":928,"pull_request":{"url":"https://api.github.com/repos/danialfarid/ng-file-upload/pulls/928","id":42135966,"html_url":"https://github.com/danialfarid/ng-file-upload/pull/928","diff_url":"https://github.com/danialfarid/ng-file-upload/pull/928.diff","patch_url":"https://github.com/danialfarid/ng-file-upload/pull/928.patch","issue_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/928","number":928,"state":"closed","locked":false,"title":"allow a custom validate function separate from ngf-accept","user":{"login":"jbarrus","id":1044815,"avatar_url":"https://avatars.githubusercontent.com/u/1044815?v=3","gravatar_id":"","url":"https://api.github.com/users/jbarrus","html_url":"https://github.com/jbarrus","followers_url":"https://api.github.com/users/jbarrus/followers","following_url":"https://api.github.com/users/jbarrus/following{/other_user}","gists_url":"https://api.github.com/users/jbarrus/gists{/gist_id}","starred_url":"https://api.github.com/users/jbarrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbarrus/subscriptions","organizations_url":"https://api.github.com/users/jbarrus/orgs","repos_url":"https://api.github.com/users/jbarrus/repos","events_url":"https://api.github.com/users/jbarrus/events{/privacy}","received_events_url":"https://api.github.com/users/jbarrus/received_events","type":"User","site_admin":false},"body":"This adds a new attribute \"ngf-validate\" for custom validation when files are added.  I found it somewhat limiting to use a custom function on the ngf-accept attribute because it disables the built in file type checking.  In my case, I have requirements to not allow certain characters in the file name as well as restrict certain file types.  If I use ngf-accept with a validation function it means I have to implement all the file type checking code to validate file type and check for invalid characters in the file name.  Using a separate attribute allows using the existing code to validate file types and also provide additional validation.\r\n\r\nIf you like this change, you might consider removing the custom validation function option on the accept tag as it is a little confusing to have both.  To avoid a breaking change, you could probably leave the functionality and just remove the documentation.\r\n\r\nThanks for a great component!","created_at":"2015-08-11T14:35:53Z","updated_at":"2015-08-12T23:56:50Z","closed_at":"2015-08-12T23:56:50Z","merged_at":"2015-08-12T23:56:50Z","merge_commit_sha":"7bc366014f12a4afc035b20a1793da535009f6b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/danialfarid/ng-file-upload/pulls/928/commits","review_comments_url":"https://api.github.com/repos/danialfarid/ng-file-upload/pulls/928/comments","review_comment_url":"https://api.github.com/repos/danialfarid/ng-file-upload/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/928/comments","statuses_url":"https://api.github.com/repos/danialfarid/ng-file-upload/statuses/f7f621d9d251e346f87538d1a86500b8413d15cd","head":{"label":"jbarrus:master","ref":"master","sha":"f7f621d9d251e346f87538d1a86500b8413d15cd","user":{"login":"jbarrus","id":1044815,"avatar_url":"https://avatars.githubusercontent.com/u/1044815?v=3","gravatar_id":"","url":"https://api.github.com/users/jbarrus","html_url":"https://github.com/jbarrus","followers_url":"https://api.github.com/users/jbarrus/followers","following_url":"https://api.github.com/users/jbarrus/following{/other_user}","gists_url":"https://api.github.com/users/jbarrus/gists{/gist_id}","starred_url":"https://api.github.com/users/jbarrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbarrus/subscriptions","organizations_url":"https://api.github.com/users/jbarrus/orgs","repos_url":"https://api.github.com/users/jbarrus/repos","events_url":"https://api.github.com/users/jbarrus/events{/privacy}","received_events_url":"https://api.github.com/users/jbarrus/received_events","type":"User","site_admin":false},"repo":{"id":40546032,"name":"ng-file-upload","full_name":"jbarrus/ng-file-upload","owner":{"login":"jbarrus","id":1044815,"avatar_url":"https://avatars.githubusercontent.com/u/1044815?v=3","gravatar_id":"","url":"https://api.github.com/users/jbarrus","html_url":"https://github.com/jbarrus","followers_url":"https://api.github.com/users/jbarrus/followers","following_url":"https://api.github.com/users/jbarrus/following{/other_user}","gists_url":"https://api.github.com/users/jbarrus/gists{/gist_id}","starred_url":"https://api.github.com/users/jbarrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbarrus/subscriptions","organizations_url":"https://api.github.com/users/jbarrus/orgs","repos_url":"https://api.github.com/users/jbarrus/repos","events_url":"https://api.github.com/users/jbarrus/events{/privacy}","received_events_url":"https://api.github.com/users/jbarrus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbarrus/ng-file-upload","description":"Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support","fork":true,"url":"https://api.github.com/repos/jbarrus/ng-file-upload","forks_url":"https://api.github.com/repos/jbarrus/ng-file-upload/forks","keys_url":"https://api.github.com/repos/jbarrus/ng-file-upload/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbarrus/ng-file-upload/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbarrus/ng-file-upload/teams","hooks_url":"https://api.github.com/repos/jbarrus/ng-file-upload/hooks","issue_events_url":"https://api.github.com/repos/jbarrus/ng-file-upload/issues/events{/number}","events_url":"https://api.github.com/repos/jbarrus/ng-file-upload/events","assignees_url":"https://api.github.com/repos/jbarrus/ng-file-upload/assignees{/user}","branches_url":"https://api.github.com/repos/jbarrus/ng-file-upload/branches{/branch}","tags_url":"https://api.github.com/repos/jbarrus/ng-file-upload/tags","blobs_url":"https://api.github.com/repos/jbarrus/ng-file-upload/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbarrus/ng-file-upload/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbarrus/ng-file-upload/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbarrus/ng-file-upload/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbarrus/ng-file-upload/statuses/{sha}","languages_url":"https://api.github.com/repos/jbarrus/ng-file-upload/languages","stargazers_url":"https://api.github.com/repos/jbarrus/ng-file-upload/stargazers","contributors_url":"https://api.github.com/repos/jbarrus/ng-file-upload/contributors","subscribers_url":"https://api.github.com/repos/jbarrus/ng-file-upload/subscribers","subscription_url":"https://api.github.com/repos/jbarrus/ng-file-upload/subscription","commits_url":"https://api.github.com/repos/jbarrus/ng-file-upload/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbarrus/ng-file-upload/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbarrus/ng-file-upload/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbarrus/ng-file-upload/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbarrus/ng-file-upload/contents/{+path}","compare_url":"https://api.github.com/repos/jbarrus/ng-file-upload/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbarrus/ng-file-upload/merges","archive_url":"https://api.github.com/repos/jbarrus/ng-file-upload/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbarrus/ng-file-upload/downloads","issues_url":"https://api.github.com/repos/jbarrus/ng-file-upload/issues{/number}","pulls_url":"https://api.github.com/repos/jbarrus/ng-file-upload/pulls{/number}","milestones_url":"https://api.github.com/repos/jbarrus/ng-file-upload/milestones{/number}","notifications_url":"https://api.github.com/repos/jbarrus/ng-file-upload/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbarrus/ng-file-upload/labels{/name}","releases_url":"https://api.github.com/repos/jbarrus/ng-file-upload/releases{/id}","created_at":"2015-08-11T14:21:19Z","updated_at":"2015-08-11T14:21:20Z","pushed_at":"2015-08-11T14:24:08Z","git_url":"git://github.com/jbarrus/ng-file-upload.git","ssh_url":"git@github.com:jbarrus/ng-file-upload.git","clone_url":"https://github.com/jbarrus/ng-file-upload.git","svn_url":"https://github.com/jbarrus/ng-file-upload","homepage":"","size":57868,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"danialfarid:master","ref":"master","sha":"a50714da303fc526961da90e2ad6daf7f38ea184","user":{"login":"danialfarid","id":1676054,"avatar_url":"https://avatars.githubusercontent.com/u/1676054?v=3","gravatar_id":"","url":"https://api.github.com/users/danialfarid","html_url":"https://github.com/danialfarid","followers_url":"https://api.github.com/users/danialfarid/followers","following_url":"https://api.github.com/users/danialfarid/following{/other_user}","gists_url":"https://api.github.com/users/danialfarid/gists{/gist_id}","starred_url":"https://api.github.com/users/danialfarid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danialfarid/subscriptions","organizations_url":"https://api.github.com/users/danialfarid/orgs","repos_url":"https://api.github.com/users/danialfarid/repos","events_url":"https://api.github.com/users/danialfarid/events{/privacy}","received_events_url":"https://api.github.com/users/danialfarid/received_events","type":"User","site_admin":false},"repo":{"id":11621778,"name":"ng-file-upload","full_name":"danialfarid/ng-file-upload","owner":{"login":"danialfarid","id":1676054,"avatar_url":"https://avatars.githubusercontent.com/u/1676054?v=3","gravatar_id":"","url":"https://api.github.com/users/danialfarid","html_url":"https://github.com/danialfarid","followers_url":"https://api.github.com/users/danialfarid/followers","following_url":"https://api.github.com/users/danialfarid/following{/other_user}","gists_url":"https://api.github.com/users/danialfarid/gists{/gist_id}","starred_url":"https://api.github.com/users/danialfarid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danialfarid/subscriptions","organizations_url":"https://api.github.com/users/danialfarid/orgs","repos_url":"https://api.github.com/users/danialfarid/repos","events_url":"https://api.github.com/users/danialfarid/events{/privacy}","received_events_url":"https://api.github.com/users/danialfarid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danialfarid/ng-file-upload","description":"Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support","fork":false,"url":"https://api.github.com/repos/danialfarid/ng-file-upload","forks_url":"https://api.github.com/repos/danialfarid/ng-file-upload/forks","keys_url":"https://api.github.com/repos/danialfarid/ng-file-upload/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danialfarid/ng-file-upload/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danialfarid/ng-file-upload/teams","hooks_url":"https://api.github.com/repos/danialfarid/ng-file-upload/hooks","issue_events_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/events{/number}","events_url":"https://api.github.com/repos/danialfarid/ng-file-upload/events","assignees_url":"https://api.github.com/repos/danialfarid/ng-file-upload/assignees{/user}","branches_url":"https://api.github.com/repos/danialfarid/ng-file-upload/branches{/branch}","tags_url":"https://api.github.com/repos/danialfarid/ng-file-upload/tags","blobs_url":"https://api.github.com/repos/danialfarid/ng-file-upload/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danialfarid/ng-file-upload/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danialfarid/ng-file-upload/git/refs{/sha}","trees_url":"https://api.github.com/repos/danialfarid/ng-file-upload/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danialfarid/ng-file-upload/statuses/{sha}","languages_url":"https://api.github.com/repos/danialfarid/ng-file-upload/languages","stargazers_url":"https://api.github.com/repos/danialfarid/ng-file-upload/stargazers","contributors_url":"https://api.github.com/repos/danialfarid/ng-file-upload/contributors","subscribers_url":"https://api.github.com/repos/danialfarid/ng-file-upload/subscribers","subscription_url":"https://api.github.com/repos/danialfarid/ng-file-upload/subscription","commits_url":"https://api.github.com/repos/danialfarid/ng-file-upload/commits{/sha}","git_commits_url":"https://api.github.com/repos/danialfarid/ng-file-upload/git/commits{/sha}","comments_url":"https://api.github.com/repos/danialfarid/ng-file-upload/comments{/number}","issue_comment_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/comments{/number}","contents_url":"https://api.github.com/repos/danialfarid/ng-file-upload/contents/{+path}","compare_url":"https://api.github.com/repos/danialfarid/ng-file-upload/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danialfarid/ng-file-upload/merges","archive_url":"https://api.github.com/repos/danialfarid/ng-file-upload/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danialfarid/ng-file-upload/downloads","issues_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues{/number}","pulls_url":"https://api.github.com/repos/danialfarid/ng-file-upload/pulls{/number}","milestones_url":"https://api.github.com/repos/danialfarid/ng-file-upload/milestones{/number}","notifications_url":"https://api.github.com/repos/danialfarid/ng-file-upload/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danialfarid/ng-file-upload/labels{/name}","releases_url":"https://api.github.com/repos/danialfarid/ng-file-upload/releases{/id}","created_at":"2013-07-23T23:29:18Z","updated_at":"2015-08-12T09:01:44Z","pushed_at":"2015-08-12T23:56:50Z","git_url":"git://github.com/danialfarid/ng-file-upload.git","ssh_url":"git@github.com:danialfarid/ng-file-upload.git","clone_url":"https://github.com/danialfarid/ng-file-upload.git","svn_url":"https://github.com/danialfarid/ng-file-upload","homepage":"","size":57868,"stargazers_count":3911,"watchers_count":3911,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":835,"mirror_url":null,"open_issues_count":70,"forks":835,"open_issues":70,"watchers":3911,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/danialfarid/ng-file-upload/pulls/928"},"html":{"href":"https://github.com/danialfarid/ng-file-upload/pull/928"},"issue":{"href":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/928"},"comments":{"href":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/928/comments"},"review_comments":{"href":"https://api.github.com/repos/danialfarid/ng-file-upload/pulls/928/comments"},"review_comment":{"href":"https://api.github.com/repos/danialfarid/ng-file-upload/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danialfarid/ng-file-upload/pulls/928/commits"},"statuses":{"href":"https://api.github.com/repos/danialfarid/ng-file-upload/statuses/f7f621d9d251e346f87538d1a86500b8413d15cd"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"danialfarid","id":1676054,"avatar_url":"https://avatars.githubusercontent.com/u/1676054?v=3","gravatar_id":"","url":"https://api.github.com/users/danialfarid","html_url":"https://github.com/danialfarid","followers_url":"https://api.github.com/users/danialfarid/followers","following_url":"https://api.github.com/users/danialfarid/following{/other_user}","gists_url":"https://api.github.com/users/danialfarid/gists{/gist_id}","starred_url":"https://api.github.com/users/danialfarid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danialfarid/subscriptions","organizations_url":"https://api.github.com/users/danialfarid/orgs","repos_url":"https://api.github.com/users/danialfarid/repos","events_url":"https://api.github.com/users/danialfarid/events{/privacy}","received_events_url":"https://api.github.com/users/danialfarid/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":6,"deletions":0,"changed_files":2}}