{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/comments/135414136","pull_request_review_id":58825025,"id":135414136,"diff_hunk":"@@ -390,3 +390,85 @@ var pinsArray = getElementsArray(OFFERS);\n tokyoPinMap.appendChild(getPinNodes(pinsArray));\n \n hideDialog();\n+\n+// validation\n+\n+// var addressInput = document.querySelector('#address');\n+var titleInput = document.querySelector('#title');\n+var priceInput = document.querySelector('#price');\n+\n+var timeIn = document.querySelector('#timein');\n+var timeOut = document.querySelector('#timeout');\n+var type = document.querySelector('#type');\n+var rooms = document.querySelector('#room_number');\n+var capacity = document.querySelector('#capacity');\n+\n+titleInput.minLength = 30;\n+titleInput.maxLength = 100;\n+\n+priceInput.minLength = 0;\n+priceInput.maxLength = 1000000;\n+priceInput.value = 1000;\n+\n+\n+var checkValidate = function () {\n+  if (!titleInput.validity.valid) {\n+    if (titleInput.validity.tooShort) {\n+      titleInput.setCustomValidity('Заголовок должен состоять минимум из 30 символов');\n+      titleInput.style.border = '1px solid red';\n+    } else if (titleInput.validity.tooLong) {\n+      titleInput.setCustomValidity('Заголовок не должен превышать 100 символов');\n+      titleInput.style.border = '1px solid red';\n+    } else if (titleInput.validity.valueMissing) {\n+      titleInput.setCustomValidity('Заполните поле заголовка');\n+      titleInput.style.border = '1px solid red';\n+    }\n+  } else {\n+    titleInput.setCustomValidity('');\n+    titleInput.style.border = 'none';\n+  }","path":"js/map.js","position":40,"original_position":40,"commit_id":"8276d44a3cade92cce1d3e3dba07e6feeabef6bb","original_commit_id":"8276d44a3cade92cce1d3e3dba07e6feeabef6bb","user":{"login":"CubiZm","id":12014703,"avatar_url":"https://avatars1.githubusercontent.com/u/12014703?v=4","gravatar_id":"","url":"https://api.github.com/users/CubiZm","html_url":"https://github.com/CubiZm","followers_url":"https://api.github.com/users/CubiZm/followers","following_url":"https://api.github.com/users/CubiZm/following{/other_user}","gists_url":"https://api.github.com/users/CubiZm/gists{/gist_id}","starred_url":"https://api.github.com/users/CubiZm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CubiZm/subscriptions","organizations_url":"https://api.github.com/users/CubiZm/orgs","repos_url":"https://api.github.com/users/CubiZm/repos","events_url":"https://api.github.com/users/CubiZm/events{/privacy}","received_events_url":"https://api.github.com/users/CubiZm/received_events","type":"User","site_admin":false},"body":"@fyvfyv как всё? у нас же сказано только это\r\n![image](https://user-images.githubusercontent.com/12014703/29751129-0ca14f36-8b53-11e7-97d9-958a3e965595.png)\r\n","created_at":"2017-08-27T15:10:59Z","updated_at":"2017-08-27T15:10:59Z","html_url":"https://github.com/htmlacademy-javascript/81563-keksobooking/pull/4#discussion_r135414136","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/comments/135414136"},"html":{"href":"https://github.com/htmlacademy-javascript/81563-keksobooking/pull/4#discussion_r135414136"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/4"}},"in_reply_to_id":135413909},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/4","id":137836257,"html_url":"https://github.com/htmlacademy-javascript/81563-keksobooking/pull/4","diff_url":"https://github.com/htmlacademy-javascript/81563-keksobooking/pull/4.diff","patch_url":"https://github.com/htmlacademy-javascript/81563-keksobooking/pull/4.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/issues/4","number":4,"state":"open","locked":false,"title":"Личный проект: доверяй, но проверяй","user":{"login":"CubiZm","id":12014703,"avatar_url":"https://avatars1.githubusercontent.com/u/12014703?v=4","gravatar_id":"","url":"https://api.github.com/users/CubiZm","html_url":"https://github.com/CubiZm","followers_url":"https://api.github.com/users/CubiZm/followers","following_url":"https://api.github.com/users/CubiZm/following{/other_user}","gists_url":"https://api.github.com/users/CubiZm/gists{/gist_id}","starred_url":"https://api.github.com/users/CubiZm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CubiZm/subscriptions","organizations_url":"https://api.github.com/users/CubiZm/orgs","repos_url":"https://api.github.com/users/CubiZm/repos","events_url":"https://api.github.com/users/CubiZm/events{/privacy}","received_events_url":"https://api.github.com/users/CubiZm/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Личный проект: доверяй, но проверяй](https://up.htmlacademy.ru/javascript/10/user/81563/tasks/12)\n\n:boom: https://htmlacademy-javascript.github.io/81563-keksobooking/4/","created_at":"2017-08-27T14:52:57Z","updated_at":"2017-08-27T15:10:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b2b6b068683ac6e64ad20cd7bac802996ca77dd","assignee":{"login":"fyvfyv","id":3251438,"avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"assignees":[{"login":"fyvfyv","id":3251438,"avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/4/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/4/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/issues/4/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/statuses/8276d44a3cade92cce1d3e3dba07e6feeabef6bb","head":{"label":"CubiZm:module4-task2","ref":"module4-task2","sha":"8276d44a3cade92cce1d3e3dba07e6feeabef6bb","user":{"login":"CubiZm","id":12014703,"avatar_url":"https://avatars1.githubusercontent.com/u/12014703?v=4","gravatar_id":"","url":"https://api.github.com/users/CubiZm","html_url":"https://github.com/CubiZm","followers_url":"https://api.github.com/users/CubiZm/followers","following_url":"https://api.github.com/users/CubiZm/following{/other_user}","gists_url":"https://api.github.com/users/CubiZm/gists{/gist_id}","starred_url":"https://api.github.com/users/CubiZm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CubiZm/subscriptions","organizations_url":"https://api.github.com/users/CubiZm/orgs","repos_url":"https://api.github.com/users/CubiZm/repos","events_url":"https://api.github.com/users/CubiZm/events{/privacy}","received_events_url":"https://api.github.com/users/CubiZm/received_events","type":"User","site_admin":false},"repo":{"id":99727179,"name":"81563-keksobooking","full_name":"CubiZm/81563-keksobooking","owner":{"login":"CubiZm","id":12014703,"avatar_url":"https://avatars1.githubusercontent.com/u/12014703?v=4","gravatar_id":"","url":"https://api.github.com/users/CubiZm","html_url":"https://github.com/CubiZm","followers_url":"https://api.github.com/users/CubiZm/followers","following_url":"https://api.github.com/users/CubiZm/following{/other_user}","gists_url":"https://api.github.com/users/CubiZm/gists{/gist_id}","starred_url":"https://api.github.com/users/CubiZm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CubiZm/subscriptions","organizations_url":"https://api.github.com/users/CubiZm/orgs","repos_url":"https://api.github.com/users/CubiZm/repos","events_url":"https://api.github.com/users/CubiZm/events{/privacy}","received_events_url":"https://api.github.com/users/CubiZm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CubiZm/81563-keksobooking","description":"Лена Карякина","fork":true,"url":"https://api.github.com/repos/CubiZm/81563-keksobooking","forks_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/forks","keys_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/teams","hooks_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/events","assignees_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/tags","blobs_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/languages","stargazers_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/subscription","commits_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/merges","archive_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/downloads","issues_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/CubiZm/81563-keksobooking/deployments","created_at":"2017-08-08T19:07:40Z","updated_at":"2017-08-08T19:07:42Z","pushed_at":"2017-08-27T14:52:44Z","git_url":"git://github.com/CubiZm/81563-keksobooking.git","ssh_url":"git@github.com:CubiZm/81563-keksobooking.git","clone_url":"https://github.com/CubiZm/81563-keksobooking.git","svn_url":"https://github.com/CubiZm/81563-keksobooking","homepage":null,"size":2542,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"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":"htmlacademy-javascript:master","ref":"master","sha":"c0986d9286584b674b102d4ba36322eb4f3b1c3a","user":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"repo":{"id":99725843,"name":"81563-keksobooking","full_name":"htmlacademy-javascript/81563-keksobooking","owner":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-javascript/81563-keksobooking","description":"Лена Карякина","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking","forks_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/deployments","created_at":"2017-08-08T18:50:55Z","updated_at":"2017-08-08T19:19:03Z","pushed_at":"2017-08-27T14:53:28Z","git_url":"git://github.com/htmlacademy-javascript/81563-keksobooking.git","ssh_url":"git@github.com:htmlacademy-javascript/81563-keksobooking.git","clone_url":"https://github.com/htmlacademy-javascript/81563-keksobooking.git","svn_url":"https://github.com/htmlacademy-javascript/81563-keksobooking","homepage":"https://github.com/CubiZm/81563-keksobooking","size":2543,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/4"},"html":{"href":"https://github.com/htmlacademy-javascript/81563-keksobooking/pull/4"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/issues/4"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/81563-keksobooking/statuses/8276d44a3cade92cce1d3e3dba07e6feeabef6bb"}}}}
{"actor":{"display_login":"CubiZm"}}