Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5388)

Unified Diff: chrome/browser/resources/options/chromeos_accounts_user_name_edit.js

Issue 5812004: Allow hypen in domain name of email address for ChromeOS users UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/chromeos_accounts_user_name_edit.js
diff --git a/chrome/browser/resources/options/chromeos_accounts_user_name_edit.js b/chrome/browser/resources/options/chromeos_accounts_user_name_edit.js
index a590d8123217d6739b15536a3dae162b5e759785..df94754174aae07fb4f9b00650b481ce68f18d04 100644
--- a/chrome/browser/resources/options/chromeos_accounts_user_name_edit.js
+++ b/chrome/browser/resources/options/chromeos_accounts_user_name_edit.js
@@ -14,12 +14,15 @@ cr.define('options.accounts', function() {
// e.g. 'john@chromium.org'
// {name: 'john', email: 'john@chromium.org'}
const format2String =
- '^\\s*([\\w\\.!#\\$%&\'\\*\\+-\\/=\\?\\^`\\{\\|\\}~]+)@(\\w+\\..+)\\s*$';
+ '^\\s*([\\w\\.!#\\$%&\'\\*\\+-\\/=\\?\\^`\\{\\|\\}~]+)@' +
+ '([A-Za-z0-9\-]{2,63}\\..+)\\s*$';
// Full format.
// e.g. '"John Doe" <john@chromium.org>'
// {name: 'John doe', email: 'john@chromium.org'}
const format3String =
- '^\\s*"{0,1}([^"]+)"{0,1}\\s*<([^@]+@\\w+\\..+)>\\s*$';
+ '^\\s*"{0,1}([^"]+)"{0,1}\\s*' +
+ '<([\\w\\.!#\\$%&\'\\*\\+-\\/=\\?\\^`\\{\\|\\}~]+@' +
+ '[A-Za-z0-9\-]{2,63}\\..+)>\\s*$';
/**
* Creates a new user name edit element.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698