{"action":"created","comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/195425307","pull_request_review_id":128791760,"id":195425307,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTQyNTMwNw==","diff_hunk":"@@ -2113,17 +2113,21 @@ protected function validateField(\\SimpleXMLElement $element, $group = null, $val\n \t\tif ($valid === false)\n \t\t{\n \t\t\t// Does the field have a defined error message?\n-\t\t\t$message = $element['message'] ? \\JText::_($element['message']) : $rule->message;\n+\t\t\t$message = (string) $element['message'];\n \n \t\t\tif ($message)\n \t\t\t{\n+\t\t\t\t$message = \\JText::_($element['message']);\n+\n \t\t\t\treturn new \\UnexpectedValueException($message);","path":"libraries/src/Form/Form.php","position":null,"original_position":11,"commit_id":"97f2d6c28c90b11c50eaf65fe6cdee7b5f8b8558","original_commit_id":"49b035865115b3b313e576bb6ff0018f8c0a86c3","user":{"login":"Quy","id":368084,"node_id":"MDQ6VXNlcjM2ODA4NA==","avatar_url":"https://avatars2.githubusercontent.com/u/368084?v=4","gravatar_id":"","url":"https://api.github.com/users/Quy","html_url":"https://github.com/Quy","followers_url":"https://api.github.com/users/Quy/followers","following_url":"https://api.github.com/users/Quy/following{/other_user}","gists_url":"https://api.github.com/users/Quy/gists{/gist_id}","starred_url":"https://api.github.com/users/Quy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quy/subscriptions","organizations_url":"https://api.github.com/users/Quy/orgs","repos_url":"https://api.github.com/users/Quy/repos","events_url":"https://api.github.com/users/Quy/events{/privacy}","received_events_url":"https://api.github.com/users/Quy/received_events","type":"User","site_admin":false},"body":"Move this after the `if` statement and delete line 2129.","created_at":"2018-06-14T13:36:11Z","updated_at":"2018-06-14T13:36:11Z","html_url":"https://github.com/joomla/joomla-cms/pull/20383#discussion_r195425307","pull_request_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/20383","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/195425307"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/20383#discussion_r195425307"},"pull_request":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/20383"}}},"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/20383","id":187675705,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg3Njc1NzA1","html_url":"https://github.com/joomla/joomla-cms/pull/20383","diff_url":"https://github.com/joomla/joomla-cms/pull/20383.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/20383.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20383","number":20383,"state":"open","locked":false,"title":"Email Domain Restrictions","user":{"login":"SharkyKZ","id":7325021,"node_id":"MDQ6VXNlcjczMjUwMjE=","avatar_url":"https://avatars2.githubusercontent.com/u/7325021?v=4","gravatar_id":"","url":"https://api.github.com/users/SharkyKZ","html_url":"https://github.com/SharkyKZ","followers_url":"https://api.github.com/users/SharkyKZ/followers","following_url":"https://api.github.com/users/SharkyKZ/following{/other_user}","gists_url":"https://api.github.com/users/SharkyKZ/gists{/gist_id}","starred_url":"https://api.github.com/users/SharkyKZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SharkyKZ/subscriptions","organizations_url":"https://api.github.com/users/SharkyKZ/orgs","repos_url":"https://api.github.com/users/SharkyKZ/repos","events_url":"https://api.github.com/users/SharkyKZ/events{/privacy}","received_events_url":"https://api.github.com/users/SharkyKZ/received_events","type":"User","site_admin":false},"body":"Pull Request for Issue # .\r\n\r\n### Summary of Changes\r\n\r\nThis PR adds user email domain restrictions. This is an alternative to #20164 with more flexibility added.\r\n\r\nThis PR also adds message property to FormRule. This allows displaying specific message based on which part of validation fails.\r\n\r\n### Testing Instructions\r\n\r\nApply patch.\r\nGo to Users configuration.\r\nIn Email Domain Options add some rules.\r\n\r\na) Try to register with disallowed email.\r\nb) Try to register with an email that isn't disallowed.\r\nc) Try to change email in user profile to a disallowed email.\r\nd) Try to change email in user profile to an allowed email.\r\ne) Remove all rules and try to register again.\r\n\r\n### Expected result\r\na) Registration fails.\r\nb) Registration successful.\r\nc) Changes not saved.\r\nd) Changes saved.\r\ne) Registration successful.\r\n\r\n### Documentation Changes Required\r\nDocument the new option.\r\nDocument validDomains attribute usage in EmailRule.\r\nDocument message property in FormRule.","created_at":"2018-05-13T15:26:28Z","updated_at":"2018-06-14T13:36:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"864824afdd32930e205b3b8a58bf4e770395083e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":198658453,"node_id":"MDU6TGFiZWwxOTg2NTg0NTM=","url":"https://api.github.com/repos/joomla/joomla-cms/labels/Language%20Change","name":"Language Change","color":"eb6420","default":false},{"id":60721348,"node_id":"MDU6TGFiZWw2MDcyMTM0OA==","url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8","default":false},{"id":32990672,"node_id":"MDU6TGFiZWwzMjk5MDY3Mg==","url":"https://api.github.com/repos/joomla/joomla-cms/labels/RTC","name":"RTC","color":"009800","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/20383/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/20383/comments","review_comment_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20383/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/97f2d6c28c90b11c50eaf65fe6cdee7b5f8b8558","head":{"label":"SharkyKZ:com_users_3","ref":"com_users_3","sha":"97f2d6c28c90b11c50eaf65fe6cdee7b5f8b8558","user":{"login":"SharkyKZ","id":7325021,"node_id":"MDQ6VXNlcjczMjUwMjE=","avatar_url":"https://avatars2.githubusercontent.com/u/7325021?v=4","gravatar_id":"","url":"https://api.github.com/users/SharkyKZ","html_url":"https://github.com/SharkyKZ","followers_url":"https://api.github.com/users/SharkyKZ/followers","following_url":"https://api.github.com/users/SharkyKZ/following{/other_user}","gists_url":"https://api.github.com/users/SharkyKZ/gists{/gist_id}","starred_url":"https://api.github.com/users/SharkyKZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SharkyKZ/subscriptions","organizations_url":"https://api.github.com/users/SharkyKZ/orgs","repos_url":"https://api.github.com/users/SharkyKZ/repos","events_url":"https://api.github.com/users/SharkyKZ/events{/privacy}","received_events_url":"https://api.github.com/users/SharkyKZ/received_events","type":"User","site_admin":false},"repo":{"id":128165904,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgxNjU5MDQ=","name":"joomla-cms","full_name":"SharkyKZ/joomla-cms","owner":{"login":"SharkyKZ","id":7325021,"node_id":"MDQ6VXNlcjczMjUwMjE=","avatar_url":"https://avatars2.githubusercontent.com/u/7325021?v=4","gravatar_id":"","url":"https://api.github.com/users/SharkyKZ","html_url":"https://github.com/SharkyKZ","followers_url":"https://api.github.com/users/SharkyKZ/followers","following_url":"https://api.github.com/users/SharkyKZ/following{/other_user}","gists_url":"https://api.github.com/users/SharkyKZ/gists{/gist_id}","starred_url":"https://api.github.com/users/SharkyKZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SharkyKZ/subscriptions","organizations_url":"https://api.github.com/users/SharkyKZ/orgs","repos_url":"https://api.github.com/users/SharkyKZ/repos","events_url":"https://api.github.com/users/SharkyKZ/events{/privacy}","received_events_url":"https://api.github.com/users/SharkyKZ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SharkyKZ/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/SharkyKZ/joomla-cms","forks_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/forks","keys_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/teams","hooks_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/events","assignees_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/tags","blobs_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/subscription","commits_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/merges","archive_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/downloads","issues_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/SharkyKZ/joomla-cms/deployments","created_at":"2018-04-05T06:08:13Z","updated_at":"2018-04-27T15:31:13Z","pushed_at":"2018-06-14T13:32:14Z","git_url":"git://github.com/SharkyKZ/joomla-cms.git","ssh_url":"git@github.com:SharkyKZ/joomla-cms.git","clone_url":"https://github.com/SharkyKZ/joomla-cms.git","svn_url":"https://github.com/SharkyKZ/joomla-cms","homepage":"https://www.joomla.org","size":235023,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"4.0-dev"}},"base":{"label":"joomla:staging","ref":"staging","sha":"f8e73449a03d952865a3fbb9da96b6aa1d44c9ff","user":{"login":"joomla","id":751633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1MTYzMw==","avatar_url":"https://avatars3.githubusercontent.com/u/751633?v=4","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":2464908,"node_id":"MDEwOlJlcG9zaXRvcnkyNDY0OTA4","name":"joomla-cms","full_name":"joomla/joomla-cms","owner":{"login":"joomla","id":751633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1MTYzMw==","avatar_url":"https://avatars3.githubusercontent.com/u/751633?v=4","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/joomla-cms","description":"Home of the Joomla! Content Management System","fork":false,"url":"https://api.github.com/repos/joomla/joomla-cms","forks_url":"https://api.github.com/repos/joomla/joomla-cms/forks","keys_url":"https://api.github.com/repos/joomla/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/joomla-cms/teams","hooks_url":"https://api.github.com/repos/joomla/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/joomla-cms/events","assignees_url":"https://api.github.com/repos/joomla/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/joomla-cms/tags","blobs_url":"https://api.github.com/repos/joomla/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/joomla/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/joomla/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/joomla/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/joomla/joomla-cms/subscription","commits_url":"https://api.github.com/repos/joomla/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/joomla/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/joomla-cms/merges","archive_url":"https://api.github.com/repos/joomla/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/joomla-cms/downloads","issues_url":"https://api.github.com/repos/joomla/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/joomla/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/joomla/joomla-cms/deployments","created_at":"2011-09-27T02:07:38Z","updated_at":"2018-06-14T11:19:44Z","pushed_at":"2018-06-14T13:32:20Z","git_url":"git://github.com/joomla/joomla-cms.git","ssh_url":"git@github.com:joomla/joomla-cms.git","clone_url":"https://github.com/joomla/joomla-cms.git","svn_url":"https://github.com/joomla/joomla-cms","homepage":"https://www.joomla.org","size":235899,"stargazers_count":2761,"watchers_count":2761,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2686,"mirror_url":null,"archived":false,"open_issues_count":822,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":2686,"open_issues":822,"watchers":2761,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/20383"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/20383"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/20383"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/20383/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/20383/comments"},"review_comment":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/20383/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/97f2d6c28c90b11c50eaf65fe6cdee7b5f8b8558"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Quy"}}