{"action":"created","comment":{"url":"https://api.github.com/repos/oat-sa/tao-core/pulls/comments/41135891","id":41135891,"diff_hunk":"@@ -0,0 +1,67 @@\n+/**\n+ * This program is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU General Public License\n+ * as published by the Free Software Foundation; under version 2\n+ * of the License (non-upgradable).\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n+ *\n+ * Copyright (c) 2015 (original work) Open Assessment Technologies SA;\n+ *\n+ */\n+\n+/**\n+ * @author Aleh Hutnikau\n+ */\n+define([\n+    'jquery',\n+    'lodash',\n+    'i18n'\n+], function ($, _, __) {\n+    'use strict';\n+\n+    /**\n+     * Error field highlighter\n+     * @param {Object} options\n+     * @param {string} [options.errorClass] - field error class\n+     * @param {string} [options.errorMessageClass] - error message class\n+     * @constructor\n+     */\n+    function Highlighter(options) {\n+        var self = this;\n+\n+        self.options = $.extend(true, {\n+            errorClass : 'error',\n+            errorMessageClass : 'validate-error'\n+        }, self.options);","path":"views/js/ui/formValidator/highlighters/message.js","position":43,"original_position":43,"commit_id":"9fc1e0f705a691ffc539cd5bba2917fe23d53ae1","original_commit_id":"9fc1e0f705a691ffc539cd5bba2917fe23d53ae1","user":{"login":"hutnikau","id":11025793,"avatar_url":"https://avatars.githubusercontent.com/u/11025793?v=3","gravatar_id":"","url":"https://api.github.com/users/hutnikau","html_url":"https://github.com/hutnikau","followers_url":"https://api.github.com/users/hutnikau/followers","following_url":"https://api.github.com/users/hutnikau/following{/other_user}","gists_url":"https://api.github.com/users/hutnikau/gists{/gist_id}","starred_url":"https://api.github.com/users/hutnikau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hutnikau/subscriptions","organizations_url":"https://api.github.com/users/hutnikau/orgs","repos_url":"https://api.github.com/users/hutnikau/repos","events_url":"https://api.github.com/users/hutnikau/events{/privacy}","received_events_url":"https://api.github.com/users/hutnikau/received_events","type":"User","site_admin":false},"body":"But i guess there could be multilevel objects in the future.\r\nI think _.defaultsDeep will be more suitable here if you prefer lodash instead of jQuery.","created_at":"2015-10-05T12:05:54Z","updated_at":"2015-10-05T12:05:54Z","html_url":"https://github.com/oat-sa/tao-core/pull/549#discussion_r41135891","pull_request_url":"https://api.github.com/repos/oat-sa/tao-core/pulls/549","_links":{"self":{"href":"https://api.github.com/repos/oat-sa/tao-core/pulls/comments/41135891"},"html":{"href":"https://github.com/oat-sa/tao-core/pull/549#discussion_r41135891"},"pull_request":{"href":"https://api.github.com/repos/oat-sa/tao-core/pulls/549"}}},"pull_request":{"url":"https://api.github.com/repos/oat-sa/tao-core/pulls/549","id":45660947,"html_url":"https://github.com/oat-sa/tao-core/pull/549","diff_url":"https://github.com/oat-sa/tao-core/pull/549.diff","patch_url":"https://github.com/oat-sa/tao-core/pull/549.patch","issue_url":"https://api.github.com/repos/oat-sa/tao-core/issues/549","number":549,"state":"open","locked":false,"title":"Tao 849 form field validation mechanism","user":{"login":"hutnikau","id":11025793,"avatar_url":"https://avatars.githubusercontent.com/u/11025793?v=3","gravatar_id":"","url":"https://api.github.com/users/hutnikau","html_url":"https://github.com/hutnikau","followers_url":"https://api.github.com/users/hutnikau/followers","following_url":"https://api.github.com/users/hutnikau/following{/other_user}","gists_url":"https://api.github.com/users/hutnikau/gists{/gist_id}","starred_url":"https://api.github.com/users/hutnikau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hutnikau/subscriptions","organizations_url":"https://api.github.com/users/hutnikau/orgs","repos_url":"https://api.github.com/users/hutnikau/repos","events_url":"https://api.github.com/users/hutnikau/events{/privacy}","received_events_url":"https://api.github.com/users/hutnikau/received_events","type":"User","site_admin":false},"body":"A have added one rule to the spoken APIP form and created the pull request:\r\nhttps://github.com/oat-sa/extension-tao-itemqti/pull/435\r\n\r\nYou can checkout to this branch to test it.\r\n\r\nI have not assigned this pull request yet because validation rules should be added to the other APIP forms.","created_at":"2015-09-22T13:11:09Z","updated_at":"2015-10-05T12:05:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e3f87fd88f991f3ed0d9b7c507b14289ff7eb33","assignee":{"login":"ssipasseuth","id":8425344,"avatar_url":"https://avatars.githubusercontent.com/u/8425344?v=3","gravatar_id":"","url":"https://api.github.com/users/ssipasseuth","html_url":"https://github.com/ssipasseuth","followers_url":"https://api.github.com/users/ssipasseuth/followers","following_url":"https://api.github.com/users/ssipasseuth/following{/other_user}","gists_url":"https://api.github.com/users/ssipasseuth/gists{/gist_id}","starred_url":"https://api.github.com/users/ssipasseuth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssipasseuth/subscriptions","organizations_url":"https://api.github.com/users/ssipasseuth/orgs","repos_url":"https://api.github.com/users/ssipasseuth/repos","events_url":"https://api.github.com/users/ssipasseuth/events{/privacy}","received_events_url":"https://api.github.com/users/ssipasseuth/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/oat-sa/tao-core/pulls/549/commits","review_comments_url":"https://api.github.com/repos/oat-sa/tao-core/pulls/549/comments","review_comment_url":"https://api.github.com/repos/oat-sa/tao-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oat-sa/tao-core/issues/549/comments","statuses_url":"https://api.github.com/repos/oat-sa/tao-core/statuses/9fc1e0f705a691ffc539cd5bba2917fe23d53ae1","head":{"label":"oat-sa:TAO-849_form_field_validation_mechanism","ref":"TAO-849_form_field_validation_mechanism","sha":"9fc1e0f705a691ffc539cd5bba2917fe23d53ae1","user":{"login":"oat-sa","id":7581081,"avatar_url":"https://avatars.githubusercontent.com/u/7581081?v=3","gravatar_id":"","url":"https://api.github.com/users/oat-sa","html_url":"https://github.com/oat-sa","followers_url":"https://api.github.com/users/oat-sa/followers","following_url":"https://api.github.com/users/oat-sa/following{/other_user}","gists_url":"https://api.github.com/users/oat-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/oat-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oat-sa/subscriptions","organizations_url":"https://api.github.com/users/oat-sa/orgs","repos_url":"https://api.github.com/users/oat-sa/repos","events_url":"https://api.github.com/users/oat-sa/events{/privacy}","received_events_url":"https://api.github.com/users/oat-sa/received_events","type":"Organization","site_admin":false},"repo":{"id":21277401,"name":"tao-core","full_name":"oat-sa/tao-core","owner":{"login":"oat-sa","id":7581081,"avatar_url":"https://avatars.githubusercontent.com/u/7581081?v=3","gravatar_id":"","url":"https://api.github.com/users/oat-sa","html_url":"https://github.com/oat-sa","followers_url":"https://api.github.com/users/oat-sa/followers","following_url":"https://api.github.com/users/oat-sa/following{/other_user}","gists_url":"https://api.github.com/users/oat-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/oat-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oat-sa/subscriptions","organizations_url":"https://api.github.com/users/oat-sa/orgs","repos_url":"https://api.github.com/users/oat-sa/repos","events_url":"https://api.github.com/users/oat-sa/events{/privacy}","received_events_url":"https://api.github.com/users/oat-sa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oat-sa/tao-core","description":"main extension of TAO","fork":false,"url":"https://api.github.com/repos/oat-sa/tao-core","forks_url":"https://api.github.com/repos/oat-sa/tao-core/forks","keys_url":"https://api.github.com/repos/oat-sa/tao-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oat-sa/tao-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oat-sa/tao-core/teams","hooks_url":"https://api.github.com/repos/oat-sa/tao-core/hooks","issue_events_url":"https://api.github.com/repos/oat-sa/tao-core/issues/events{/number}","events_url":"https://api.github.com/repos/oat-sa/tao-core/events","assignees_url":"https://api.github.com/repos/oat-sa/tao-core/assignees{/user}","branches_url":"https://api.github.com/repos/oat-sa/tao-core/branches{/branch}","tags_url":"https://api.github.com/repos/oat-sa/tao-core/tags","blobs_url":"https://api.github.com/repos/oat-sa/tao-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oat-sa/tao-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oat-sa/tao-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/oat-sa/tao-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oat-sa/tao-core/statuses/{sha}","languages_url":"https://api.github.com/repos/oat-sa/tao-core/languages","stargazers_url":"https://api.github.com/repos/oat-sa/tao-core/stargazers","contributors_url":"https://api.github.com/repos/oat-sa/tao-core/contributors","subscribers_url":"https://api.github.com/repos/oat-sa/tao-core/subscribers","subscription_url":"https://api.github.com/repos/oat-sa/tao-core/subscription","commits_url":"https://api.github.com/repos/oat-sa/tao-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/oat-sa/tao-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/oat-sa/tao-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/oat-sa/tao-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/oat-sa/tao-core/contents/{+path}","compare_url":"https://api.github.com/repos/oat-sa/tao-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oat-sa/tao-core/merges","archive_url":"https://api.github.com/repos/oat-sa/tao-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oat-sa/tao-core/downloads","issues_url":"https://api.github.com/repos/oat-sa/tao-core/issues{/number}","pulls_url":"https://api.github.com/repos/oat-sa/tao-core/pulls{/number}","milestones_url":"https://api.github.com/repos/oat-sa/tao-core/milestones{/number}","notifications_url":"https://api.github.com/repos/oat-sa/tao-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oat-sa/tao-core/labels{/name}","releases_url":"https://api.github.com/repos/oat-sa/tao-core/releases{/id}","created_at":"2014-06-27T13:54:01Z","updated_at":"2015-07-16T15:31:12Z","pushed_at":"2015-10-05T09:49:08Z","git_url":"git://github.com/oat-sa/tao-core.git","ssh_url":"git@github.com:oat-sa/tao-core.git","clone_url":"https://github.com/oat-sa/tao-core.git","svn_url":"https://github.com/oat-sa/tao-core","homepage":"http://www.taotesting.com","size":70370,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":17,"forks":1,"open_issues":17,"watchers":6,"default_branch":"master"}},"base":{"label":"oat-sa:develop","ref":"develop","sha":"7486e7b3b30a96c3f3a4515a416d049b5f71b8de","user":{"login":"oat-sa","id":7581081,"avatar_url":"https://avatars.githubusercontent.com/u/7581081?v=3","gravatar_id":"","url":"https://api.github.com/users/oat-sa","html_url":"https://github.com/oat-sa","followers_url":"https://api.github.com/users/oat-sa/followers","following_url":"https://api.github.com/users/oat-sa/following{/other_user}","gists_url":"https://api.github.com/users/oat-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/oat-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oat-sa/subscriptions","organizations_url":"https://api.github.com/users/oat-sa/orgs","repos_url":"https://api.github.com/users/oat-sa/repos","events_url":"https://api.github.com/users/oat-sa/events{/privacy}","received_events_url":"https://api.github.com/users/oat-sa/received_events","type":"Organization","site_admin":false},"repo":{"id":21277401,"name":"tao-core","full_name":"oat-sa/tao-core","owner":{"login":"oat-sa","id":7581081,"avatar_url":"https://avatars.githubusercontent.com/u/7581081?v=3","gravatar_id":"","url":"https://api.github.com/users/oat-sa","html_url":"https://github.com/oat-sa","followers_url":"https://api.github.com/users/oat-sa/followers","following_url":"https://api.github.com/users/oat-sa/following{/other_user}","gists_url":"https://api.github.com/users/oat-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/oat-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oat-sa/subscriptions","organizations_url":"https://api.github.com/users/oat-sa/orgs","repos_url":"https://api.github.com/users/oat-sa/repos","events_url":"https://api.github.com/users/oat-sa/events{/privacy}","received_events_url":"https://api.github.com/users/oat-sa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oat-sa/tao-core","description":"main extension of TAO","fork":false,"url":"https://api.github.com/repos/oat-sa/tao-core","forks_url":"https://api.github.com/repos/oat-sa/tao-core/forks","keys_url":"https://api.github.com/repos/oat-sa/tao-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oat-sa/tao-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oat-sa/tao-core/teams","hooks_url":"https://api.github.com/repos/oat-sa/tao-core/hooks","issue_events_url":"https://api.github.com/repos/oat-sa/tao-core/issues/events{/number}","events_url":"https://api.github.com/repos/oat-sa/tao-core/events","assignees_url":"https://api.github.com/repos/oat-sa/tao-core/assignees{/user}","branches_url":"https://api.github.com/repos/oat-sa/tao-core/branches{/branch}","tags_url":"https://api.github.com/repos/oat-sa/tao-core/tags","blobs_url":"https://api.github.com/repos/oat-sa/tao-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oat-sa/tao-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oat-sa/tao-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/oat-sa/tao-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oat-sa/tao-core/statuses/{sha}","languages_url":"https://api.github.com/repos/oat-sa/tao-core/languages","stargazers_url":"https://api.github.com/repos/oat-sa/tao-core/stargazers","contributors_url":"https://api.github.com/repos/oat-sa/tao-core/contributors","subscribers_url":"https://api.github.com/repos/oat-sa/tao-core/subscribers","subscription_url":"https://api.github.com/repos/oat-sa/tao-core/subscription","commits_url":"https://api.github.com/repos/oat-sa/tao-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/oat-sa/tao-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/oat-sa/tao-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/oat-sa/tao-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/oat-sa/tao-core/contents/{+path}","compare_url":"https://api.github.com/repos/oat-sa/tao-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oat-sa/tao-core/merges","archive_url":"https://api.github.com/repos/oat-sa/tao-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oat-sa/tao-core/downloads","issues_url":"https://api.github.com/repos/oat-sa/tao-core/issues{/number}","pulls_url":"https://api.github.com/repos/oat-sa/tao-core/pulls{/number}","milestones_url":"https://api.github.com/repos/oat-sa/tao-core/milestones{/number}","notifications_url":"https://api.github.com/repos/oat-sa/tao-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oat-sa/tao-core/labels{/name}","releases_url":"https://api.github.com/repos/oat-sa/tao-core/releases{/id}","created_at":"2014-06-27T13:54:01Z","updated_at":"2015-07-16T15:31:12Z","pushed_at":"2015-10-05T09:49:08Z","git_url":"git://github.com/oat-sa/tao-core.git","ssh_url":"git@github.com:oat-sa/tao-core.git","clone_url":"https://github.com/oat-sa/tao-core.git","svn_url":"https://github.com/oat-sa/tao-core","homepage":"http://www.taotesting.com","size":70370,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":17,"forks":1,"open_issues":17,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oat-sa/tao-core/pulls/549"},"html":{"href":"https://github.com/oat-sa/tao-core/pull/549"},"issue":{"href":"https://api.github.com/repos/oat-sa/tao-core/issues/549"},"comments":{"href":"https://api.github.com/repos/oat-sa/tao-core/issues/549/comments"},"review_comments":{"href":"https://api.github.com/repos/oat-sa/tao-core/pulls/549/comments"},"review_comment":{"href":"https://api.github.com/repos/oat-sa/tao-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oat-sa/tao-core/pulls/549/commits"},"statuses":{"href":"https://api.github.com/repos/oat-sa/tao-core/statuses/9fc1e0f705a691ffc539cd5bba2917fe23d53ae1"}}}}