{"action":"created","comment":{"url":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/comments/48607252","id":48607252,"diff_hunk":"@@ -0,0 +1,55 @@\n+function content_for_step_is_valid(clicked_button){\n+  var step_is_valid = true;\n+  var fieldset_id = clicked_button.data('fieldset');\n+\n+  var step_values = $('#'+fieldset_id).serialize()\n+  step_values = serialize_unchecked(fieldset_id, step_values)\n+  step_values = step_values.split('&');\n+\n+  for( var i = 0; i < (step_values.length); i++){\n+    var key_value = step_values[i].split('=');\n+    if(key_value[0] != \"comments\"){\n+      var field = $('#'+key_value[0]);\n+      var value = key_value[1].trim();\n+      step_is_valid = (perform_dedicate_validation(field, value) && step_is_valid);\n+    }\n+  }\n+  return step_is_valid;\n+}\n+\n+function perform_dedicate_validation(field, value){\n+  var field_is_valid = true;\n+  var validation_type = field.data('validation-type');\n+  switch(validation_type) {\n+    case 'drop_or_radio':\n+      var parentId = field.data('parent-id');\n+      field_is_valid = ($('#'+parentId).text() == $('#'+parentId+'_id').val());\n+      break;\n+    case 'only_letters':\n+      field_is_valid = (value.length >= 10) && (/^[a-z\\+]+$/i.test(value) );\n+      break;\n+    case 'phone':\n+      field_is_valid = (value.length >= 8) && !(value.match(/[^0-9]+/gi));\n+      break;\n+    case 'email':\n+      field_is_valid =  (value.length >= 6) && ((value.match(/[A-Z0-9._%+-]+%40[A-Z0-9.-]+\\.[A-Z]{2,4}/gi)) != null)  ;\n+      break;\n+    case 'mandatory_check':\n+      field_is_valid = (value == 'Si');\n+      break;\n+    default:\n+      field_is_valid = (value != '');","path":"assets/js/123validations.js","position":41,"original_position":41,"commit_id":"34b3ddcbcea3bbc3765dd4b1f74c80cc978aaf33","original_commit_id":"34b3ddcbcea3bbc3765dd4b1f74c80cc978aaf33","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Identifier 'field_is_valid' is not in camel case.<br>Use '!==' to compare with ''.","created_at":"2015-12-30T14:46:49Z","updated_at":"2015-12-30T14:46:49Z","html_url":"https://github.com/jonnyjava/auto-repair-child/pull/4#discussion_r48607252","pull_request_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/comments/48607252"},"html":{"href":"https://github.com/jonnyjava/auto-repair-child/pull/4#discussion_r48607252"},"pull_request":{"href":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/4","id":54804371,"html_url":"https://github.com/jonnyjava/auto-repair-child/pull/4","diff_url":"https://github.com/jonnyjava/auto-repair-child/pull/4.diff","patch_url":"https://github.com/jonnyjava/auto-repair-child/pull/4.patch","issue_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues/4","number":4,"state":"open","locked":false,"title":"Mandatoryness","user":{"login":"jonnyjava","id":3618983,"avatar_url":"https://avatars.githubusercontent.com/u/3618983?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnyjava","html_url":"https://github.com/jonnyjava","followers_url":"https://api.github.com/users/jonnyjava/followers","following_url":"https://api.github.com/users/jonnyjava/following{/other_user}","gists_url":"https://api.github.com/users/jonnyjava/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnyjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnyjava/subscriptions","organizations_url":"https://api.github.com/users/jonnyjava/orgs","repos_url":"https://api.github.com/users/jonnyjava/repos","events_url":"https://api.github.com/users/jonnyjava/events{/privacy}","received_events_url":"https://api.github.com/users/jonnyjava/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-30T14:46:43Z","updated_at":"2015-12-30T14:46:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"963f9bec63cd3aab911e5c472664f048f3a03878","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/4/commits","review_comments_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/4/comments","review_comment_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues/4/comments","statuses_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/statuses/34b3ddcbcea3bbc3765dd4b1f74c80cc978aaf33","head":{"label":"jonnyjava:mandatoryness","ref":"mandatoryness","sha":"34b3ddcbcea3bbc3765dd4b1f74c80cc978aaf33","user":{"login":"jonnyjava","id":3618983,"avatar_url":"https://avatars.githubusercontent.com/u/3618983?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnyjava","html_url":"https://github.com/jonnyjava","followers_url":"https://api.github.com/users/jonnyjava/followers","following_url":"https://api.github.com/users/jonnyjava/following{/other_user}","gists_url":"https://api.github.com/users/jonnyjava/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnyjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnyjava/subscriptions","organizations_url":"https://api.github.com/users/jonnyjava/orgs","repos_url":"https://api.github.com/users/jonnyjava/repos","events_url":"https://api.github.com/users/jonnyjava/events{/privacy}","received_events_url":"https://api.github.com/users/jonnyjava/received_events","type":"User","site_admin":false},"repo":{"id":48102274,"name":"auto-repair-child","full_name":"jonnyjava/auto-repair-child","owner":{"login":"jonnyjava","id":3618983,"avatar_url":"https://avatars.githubusercontent.com/u/3618983?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnyjava","html_url":"https://github.com/jonnyjava","followers_url":"https://api.github.com/users/jonnyjava/followers","following_url":"https://api.github.com/users/jonnyjava/following{/other_user}","gists_url":"https://api.github.com/users/jonnyjava/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnyjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnyjava/subscriptions","organizations_url":"https://api.github.com/users/jonnyjava/orgs","repos_url":"https://api.github.com/users/jonnyjava/repos","events_url":"https://api.github.com/users/jonnyjava/events{/privacy}","received_events_url":"https://api.github.com/users/jonnyjava/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonnyjava/auto-repair-child","description":"Custom child theme for wordpress","fork":false,"url":"https://api.github.com/repos/jonnyjava/auto-repair-child","forks_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/forks","keys_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/teams","hooks_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/hooks","issue_events_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues/events{/number}","events_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/events","assignees_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/assignees{/user}","branches_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/branches{/branch}","tags_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/tags","blobs_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/statuses/{sha}","languages_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/languages","stargazers_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/stargazers","contributors_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/contributors","subscribers_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/subscribers","subscription_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/subscription","commits_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/contents/{+path}","compare_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/merges","archive_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/downloads","issues_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues{/number}","pulls_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls{/number}","milestones_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/milestones{/number}","notifications_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/labels{/name}","releases_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/releases{/id}","created_at":"2015-12-16T10:01:05Z","updated_at":"2015-12-28T18:08:02Z","pushed_at":"2015-12-30T14:46:43Z","git_url":"git://github.com/jonnyjava/auto-repair-child.git","ssh_url":"git@github.com:jonnyjava/auto-repair-child.git","clone_url":"https://github.com/jonnyjava/auto-repair-child.git","svn_url":"https://github.com/jonnyjava/auto-repair-child","homepage":null,"size":2125,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"jonnyjava:master","ref":"master","sha":"179621208972eacd33fa61d0a92ffec1460863bc","user":{"login":"jonnyjava","id":3618983,"avatar_url":"https://avatars.githubusercontent.com/u/3618983?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnyjava","html_url":"https://github.com/jonnyjava","followers_url":"https://api.github.com/users/jonnyjava/followers","following_url":"https://api.github.com/users/jonnyjava/following{/other_user}","gists_url":"https://api.github.com/users/jonnyjava/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnyjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnyjava/subscriptions","organizations_url":"https://api.github.com/users/jonnyjava/orgs","repos_url":"https://api.github.com/users/jonnyjava/repos","events_url":"https://api.github.com/users/jonnyjava/events{/privacy}","received_events_url":"https://api.github.com/users/jonnyjava/received_events","type":"User","site_admin":false},"repo":{"id":48102274,"name":"auto-repair-child","full_name":"jonnyjava/auto-repair-child","owner":{"login":"jonnyjava","id":3618983,"avatar_url":"https://avatars.githubusercontent.com/u/3618983?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnyjava","html_url":"https://github.com/jonnyjava","followers_url":"https://api.github.com/users/jonnyjava/followers","following_url":"https://api.github.com/users/jonnyjava/following{/other_user}","gists_url":"https://api.github.com/users/jonnyjava/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnyjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnyjava/subscriptions","organizations_url":"https://api.github.com/users/jonnyjava/orgs","repos_url":"https://api.github.com/users/jonnyjava/repos","events_url":"https://api.github.com/users/jonnyjava/events{/privacy}","received_events_url":"https://api.github.com/users/jonnyjava/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonnyjava/auto-repair-child","description":"Custom child theme for wordpress","fork":false,"url":"https://api.github.com/repos/jonnyjava/auto-repair-child","forks_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/forks","keys_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/teams","hooks_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/hooks","issue_events_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues/events{/number}","events_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/events","assignees_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/assignees{/user}","branches_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/branches{/branch}","tags_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/tags","blobs_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/statuses/{sha}","languages_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/languages","stargazers_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/stargazers","contributors_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/contributors","subscribers_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/subscribers","subscription_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/subscription","commits_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/contents/{+path}","compare_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/merges","archive_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/downloads","issues_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues{/number}","pulls_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls{/number}","milestones_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/milestones{/number}","notifications_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/labels{/name}","releases_url":"https://api.github.com/repos/jonnyjava/auto-repair-child/releases{/id}","created_at":"2015-12-16T10:01:05Z","updated_at":"2015-12-28T18:08:02Z","pushed_at":"2015-12-30T14:46:43Z","git_url":"git://github.com/jonnyjava/auto-repair-child.git","ssh_url":"git@github.com:jonnyjava/auto-repair-child.git","clone_url":"https://github.com/jonnyjava/auto-repair-child.git","svn_url":"https://github.com/jonnyjava/auto-repair-child","homepage":null,"size":2125,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/4"},"html":{"href":"https://github.com/jonnyjava/auto-repair-child/pull/4"},"issue":{"href":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues/4"},"comments":{"href":"https://api.github.com/repos/jonnyjava/auto-repair-child/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jonnyjava/auto-repair-child/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/jonnyjava/auto-repair-child/statuses/34b3ddcbcea3bbc3765dd4b1f74c80cc978aaf33"}}}}