{"record":{"id":"d4e9ec75b0284072","repo":"phacility/phabricator","slug":"email-addresses-should-be-in-the-form-user-domain","errorCode":null,"errorMessage":"Email addresses should be in the form \"user@domain.com\". The maximum length of an email address is %s characters.","messagePattern":"Email addresses should be in the form \"user@domain\\.com\"\\. The maximum length of an email address is (.+?) characters\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/people/editor/PhabricatorUserEditor.php","lineNumber":465,"sourceCode":"      ->didUpdateEmailAddress($email->getAddress());\n  }\n\n\n/* -(  Internals  )---------------------------------------------------------- */\n\n\n  /**\n   * @task internal\n   */\n  private function willAddEmail(PhabricatorUserEmail $email) {\n\n    // Hard check before write to prevent creation of disallowed email\n    // addresses. Normally, the application does checks and raises more\n    // user friendly errors for us, but we omit the courtesy checks on some\n    // pathways like administrative scripts for simplicity.\n\n    if (!PhabricatorUserEmail::isValidAddress($email->getAddress())) {\n      throw new Exception(PhabricatorUserEmail::describeValidAddresses());\n    }\n\n    if (!PhabricatorUserEmail::isAllowedAddress($email->getAddress())) {\n      throw new Exception(PhabricatorUserEmail::describeAllowedAddresses());\n    }\n\n    $application_email = id(new PhabricatorMetaMTAApplicationEmailQuery())\n      ->setViewer(PhabricatorUser::getOmnipotentUser())\n      ->withAddresses(array($email->getAddress()))\n      ->executeOne();\n    if ($application_email) {\n      throw new Exception($application_email->getInUseMessage());\n    }\n  }\n\n  public function revokePasswordResetLinks(PhabricatorUser $user) {\n    // Revoke any outstanding password reset links. If an attacker compromises\n    // an account, changes the email address, and sends themselves a password","sourceCodeStart":447,"sourceCodeEnd":483,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/people/editor/PhabricatorUserEditor.php#L447-L483","documentation":"Error \"Email addresses should be in the form \"user@domain.com\". The maximum length of an email address is %s characters.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/people/editor/PhabricatorUserEditor.php:465 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}