Commit 7b0db3eb authored by epriestley's avatar epriestley
Browse files

Fix an email address validation UI feedback issue when creating new users

Summary: On the "New User" web workflow, if you use an invalid email address, you get a failure with an empty message.

Test Plan:
  - Before: Tried to create a new user with address "asdf". Got no specific guidance.
  - After: Got specific guidance about email address formatting and length.

Differential Revision: https://secure.phabricator.com/D21264
parent 93b08f0e
......@@ -50,9 +50,12 @@ final class PhabricatorPeopleNewController
if (!strlen($new_email)) {
$errors[] = pht('Email is required.');
$e_email = pht('Required');
} else if (!PhabricatorUserEmail::isAllowedAddress($new_email)) {
} else if (!PhabricatorUserEmail::isValidAddress($new_email)) {
$errors[] = PhabricatorUserEmail::describeValidAddresses();
$e_email = pht('Invalid');
} else if (!PhabricatorUserEmail::isAllowedAddress($new_email)) {
$errors[] = PhabricatorUserEmail::describeAllowedAddresses();
$e_email = pht('Not Allowed');
} else {
$e_email = null;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment