{"action":"opened","number":6,"pull_request":{"url":"https://api.github.com/repos/azerbini/eamena_dev/pulls/6","id":184136991,"html_url":"https://github.com/azerbini/eamena_dev/pull/6","diff_url":"https://github.com/azerbini/eamena_dev/pull/6.diff","patch_url":"https://github.com/azerbini/eamena_dev/pull/6.patch","issue_url":"https://api.github.com/repos/azerbini/eamena_dev/issues/6","number":6,"state":"open","locked":false,"title":"Implement better form validation strategy in Assessment Summary Form","user":{"login":"mradamcox","id":10427268,"avatar_url":"https://avatars3.githubusercontent.com/u/10427268?v=4","gravatar_id":"","url":"https://api.github.com/users/mradamcox","html_url":"https://github.com/mradamcox","followers_url":"https://api.github.com/users/mradamcox/followers","following_url":"https://api.github.com/users/mradamcox/following{/other_user}","gists_url":"https://api.github.com/users/mradamcox/gists{/gist_id}","starred_url":"https://api.github.com/users/mradamcox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mradamcox/subscriptions","organizations_url":"https://api.github.com/users/mradamcox/orgs","repos_url":"https://api.github.com/users/mradamcox/repos","events_url":"https://api.github.com/users/mradamcox/events{/privacy}","received_events_url":"https://api.github.com/users/mradamcox/received_events","type":"User","site_admin":false},"body":"This PR introduces the new paradigm for form validation by adding a new view model located in js/views/forms/sections/validation.js. This view model is then instantiated at the beginning of a form's js file as a variable called `vt`, and functions from the view model can be called within any branchlist's `validateBranch` function. In this PR, the existing assessment-summary form is modified as a demonstration.\r\n\r\nOnly two functions are included in validation.js so far:\r\n\r\n- `isValidDate` will return true only if a date field contains a properly formatted date \"YYYY-MM-DD\", or is blank.\r\n- `nodesHaveValues` can be passed a list of node names and will only return true if each of these nodes has a value.\r\n\r\nNew functions can easily be added to this file following the patterns already set in place, and then utilized in any form that references this view model.\r\n\r\nPlease note this comes from earlier work I did for the AFRH Arches installation: https://github.com/mradamcox/afrh/blob/master/afrh/media/js/views/forms/sections/validation.js","created_at":"2018-04-25T19:18:51Z","updated_at":"2018-04-25T19:18:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/azerbini/eamena_dev/pulls/6/commits","review_comments_url":"https://api.github.com/repos/azerbini/eamena_dev/pulls/6/comments","review_comment_url":"https://api.github.com/repos/azerbini/eamena_dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azerbini/eamena_dev/issues/6/comments","statuses_url":"https://api.github.com/repos/azerbini/eamena_dev/statuses/30cfe8d572e1b84598096a84df04d883247dd589","head":{"label":"legiongis:improve_form_validation","ref":"improve_form_validation","sha":"30cfe8d572e1b84598096a84df04d883247dd589","user":{"login":"legiongis","id":29872100,"avatar_url":"https://avatars2.githubusercontent.com/u/29872100?v=4","gravatar_id":"","url":"https://api.github.com/users/legiongis","html_url":"https://github.com/legiongis","followers_url":"https://api.github.com/users/legiongis/followers","following_url":"https://api.github.com/users/legiongis/following{/other_user}","gists_url":"https://api.github.com/users/legiongis/gists{/gist_id}","starred_url":"https://api.github.com/users/legiongis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legiongis/subscriptions","organizations_url":"https://api.github.com/users/legiongis/orgs","repos_url":"https://api.github.com/users/legiongis/repos","events_url":"https://api.github.com/users/legiongis/events{/privacy}","received_events_url":"https://api.github.com/users/legiongis/received_events","type":"Organization","site_admin":false},"repo":{"id":107464338,"name":"arches","full_name":"legiongis/arches","owner":{"login":"legiongis","id":29872100,"avatar_url":"https://avatars2.githubusercontent.com/u/29872100?v=4","gravatar_id":"","url":"https://api.github.com/users/legiongis","html_url":"https://github.com/legiongis","followers_url":"https://api.github.com/users/legiongis/followers","following_url":"https://api.github.com/users/legiongis/following{/other_user}","gists_url":"https://api.github.com/users/legiongis/gists{/gist_id}","starred_url":"https://api.github.com/users/legiongis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legiongis/subscriptions","organizations_url":"https://api.github.com/users/legiongis/orgs","repos_url":"https://api.github.com/users/legiongis/repos","events_url":"https://api.github.com/users/legiongis/events{/privacy}","received_events_url":"https://api.github.com/users/legiongis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/legiongis/arches","description":"Arches is a web-based, geospatial information system for cultural heritage inventory and management.","fork":true,"url":"https://api.github.com/repos/legiongis/arches","forks_url":"https://api.github.com/repos/legiongis/arches/forks","keys_url":"https://api.github.com/repos/legiongis/arches/keys{/key_id}","collaborators_url":"https://api.github.com/repos/legiongis/arches/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/legiongis/arches/teams","hooks_url":"https://api.github.com/repos/legiongis/arches/hooks","issue_events_url":"https://api.github.com/repos/legiongis/arches/issues/events{/number}","events_url":"https://api.github.com/repos/legiongis/arches/events","assignees_url":"https://api.github.com/repos/legiongis/arches/assignees{/user}","branches_url":"https://api.github.com/repos/legiongis/arches/branches{/branch}","tags_url":"https://api.github.com/repos/legiongis/arches/tags","blobs_url":"https://api.github.com/repos/legiongis/arches/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/legiongis/arches/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/legiongis/arches/git/refs{/sha}","trees_url":"https://api.github.com/repos/legiongis/arches/git/trees{/sha}","statuses_url":"https://api.github.com/repos/legiongis/arches/statuses/{sha}","languages_url":"https://api.github.com/repos/legiongis/arches/languages","stargazers_url":"https://api.github.com/repos/legiongis/arches/stargazers","contributors_url":"https://api.github.com/repos/legiongis/arches/contributors","subscribers_url":"https://api.github.com/repos/legiongis/arches/subscribers","subscription_url":"https://api.github.com/repos/legiongis/arches/subscription","commits_url":"https://api.github.com/repos/legiongis/arches/commits{/sha}","git_commits_url":"https://api.github.com/repos/legiongis/arches/git/commits{/sha}","comments_url":"https://api.github.com/repos/legiongis/arches/comments{/number}","issue_comment_url":"https://api.github.com/repos/legiongis/arches/issues/comments{/number}","contents_url":"https://api.github.com/repos/legiongis/arches/contents/{+path}","compare_url":"https://api.github.com/repos/legiongis/arches/compare/{base}...{head}","merges_url":"https://api.github.com/repos/legiongis/arches/merges","archive_url":"https://api.github.com/repos/legiongis/arches/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/legiongis/arches/downloads","issues_url":"https://api.github.com/repos/legiongis/arches/issues{/number}","pulls_url":"https://api.github.com/repos/legiongis/arches/pulls{/number}","milestones_url":"https://api.github.com/repos/legiongis/arches/milestones{/number}","notifications_url":"https://api.github.com/repos/legiongis/arches/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/legiongis/arches/labels{/name}","releases_url":"https://api.github.com/repos/legiongis/arches/releases{/id}","deployments_url":"https://api.github.com/repos/legiongis/arches/deployments","created_at":"2017-10-18T21:20:07Z","updated_at":"2017-12-20T16:27:40Z","pushed_at":"2018-04-25T18:57:11Z","git_url":"git://github.com/legiongis/arches.git","ssh_url":"git@github.com:legiongis/arches.git","clone_url":"https://github.com/legiongis/arches.git","svn_url":"https://github.com/legiongis/arches","homepage":null,"size":189498,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"azerbini:eamena-migration-branch","ref":"eamena-migration-branch","sha":"2ba29ca9a5adb470649e6a5d11860df72dfc0a39","user":{"login":"azerbini","id":19243127,"avatar_url":"https://avatars3.githubusercontent.com/u/19243127?v=4","gravatar_id":"","url":"https://api.github.com/users/azerbini","html_url":"https://github.com/azerbini","followers_url":"https://api.github.com/users/azerbini/followers","following_url":"https://api.github.com/users/azerbini/following{/other_user}","gists_url":"https://api.github.com/users/azerbini/gists{/gist_id}","starred_url":"https://api.github.com/users/azerbini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azerbini/subscriptions","organizations_url":"https://api.github.com/users/azerbini/orgs","repos_url":"https://api.github.com/users/azerbini/repos","events_url":"https://api.github.com/users/azerbini/events{/privacy}","received_events_url":"https://api.github.com/users/azerbini/received_events","type":"User","site_admin":false},"repo":{"id":87292997,"name":"eamena_dev","full_name":"azerbini/eamena_dev","owner":{"login":"azerbini","id":19243127,"avatar_url":"https://avatars3.githubusercontent.com/u/19243127?v=4","gravatar_id":"","url":"https://api.github.com/users/azerbini","html_url":"https://github.com/azerbini","followers_url":"https://api.github.com/users/azerbini/followers","following_url":"https://api.github.com/users/azerbini/following{/other_user}","gists_url":"https://api.github.com/users/azerbini/gists{/gist_id}","starred_url":"https://api.github.com/users/azerbini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azerbini/subscriptions","organizations_url":"https://api.github.com/users/azerbini/orgs","repos_url":"https://api.github.com/users/azerbini/repos","events_url":"https://api.github.com/users/azerbini/events{/privacy}","received_events_url":"https://api.github.com/users/azerbini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/azerbini/eamena_dev","description":"Arches is a web-based, geospatial information system for cultural heritage inventory and management.","fork":true,"url":"https://api.github.com/repos/azerbini/eamena_dev","forks_url":"https://api.github.com/repos/azerbini/eamena_dev/forks","keys_url":"https://api.github.com/repos/azerbini/eamena_dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azerbini/eamena_dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azerbini/eamena_dev/teams","hooks_url":"https://api.github.com/repos/azerbini/eamena_dev/hooks","issue_events_url":"https://api.github.com/repos/azerbini/eamena_dev/issues/events{/number}","events_url":"https://api.github.com/repos/azerbini/eamena_dev/events","assignees_url":"https://api.github.com/repos/azerbini/eamena_dev/assignees{/user}","branches_url":"https://api.github.com/repos/azerbini/eamena_dev/branches{/branch}","tags_url":"https://api.github.com/repos/azerbini/eamena_dev/tags","blobs_url":"https://api.github.com/repos/azerbini/eamena_dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azerbini/eamena_dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azerbini/eamena_dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/azerbini/eamena_dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azerbini/eamena_dev/statuses/{sha}","languages_url":"https://api.github.com/repos/azerbini/eamena_dev/languages","stargazers_url":"https://api.github.com/repos/azerbini/eamena_dev/stargazers","contributors_url":"https://api.github.com/repos/azerbini/eamena_dev/contributors","subscribers_url":"https://api.github.com/repos/azerbini/eamena_dev/subscribers","subscription_url":"https://api.github.com/repos/azerbini/eamena_dev/subscription","commits_url":"https://api.github.com/repos/azerbini/eamena_dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/azerbini/eamena_dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/azerbini/eamena_dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/azerbini/eamena_dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/azerbini/eamena_dev/contents/{+path}","compare_url":"https://api.github.com/repos/azerbini/eamena_dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azerbini/eamena_dev/merges","archive_url":"https://api.github.com/repos/azerbini/eamena_dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azerbini/eamena_dev/downloads","issues_url":"https://api.github.com/repos/azerbini/eamena_dev/issues{/number}","pulls_url":"https://api.github.com/repos/azerbini/eamena_dev/pulls{/number}","milestones_url":"https://api.github.com/repos/azerbini/eamena_dev/milestones{/number}","notifications_url":"https://api.github.com/repos/azerbini/eamena_dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azerbini/eamena_dev/labels{/name}","releases_url":"https://api.github.com/repos/azerbini/eamena_dev/releases{/id}","deployments_url":"https://api.github.com/repos/azerbini/eamena_dev/deployments","created_at":"2017-04-05T09:44:40Z","updated_at":"2018-04-19T16:44:12Z","pushed_at":"2018-04-25T18:54:57Z","git_url":"git://github.com/azerbini/eamena_dev.git","ssh_url":"git@github.com:azerbini/eamena_dev.git","clone_url":"https://github.com/azerbini/eamena_dev.git","svn_url":"https://github.com/azerbini/eamena_dev","homepage":null,"size":94066,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/azerbini/eamena_dev/pulls/6"},"html":{"href":"https://github.com/azerbini/eamena_dev/pull/6"},"issue":{"href":"https://api.github.com/repos/azerbini/eamena_dev/issues/6"},"comments":{"href":"https://api.github.com/repos/azerbini/eamena_dev/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/azerbini/eamena_dev/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/azerbini/eamena_dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azerbini/eamena_dev/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/azerbini/eamena_dev/statuses/30cfe8d572e1b84598096a84df04d883247dd589"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":95,"deletions":7,"changed_files":3}}
{"actor":{"display_login":"mradamcox"}}