Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/provider/PhabricatorAuthProviderOAuth1JIRA.php
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | public function processEditForm( | ||||
$is_setup = $this->isSetup(); | $is_setup = $this->isSetup(); | ||||
$key_name = self::PROPERTY_JIRA_NAME; | $key_name = self::PROPERTY_JIRA_NAME; | ||||
$key_uri = self::PROPERTY_JIRA_URI; | $key_uri = self::PROPERTY_JIRA_URI; | ||||
if (!strlen($values[$key_name])) { | if (!strlen($values[$key_name])) { | ||||
$errors[] = pht('JIRA instance name is required.'); | $errors[] = pht('JIRA instance name is required.'); | ||||
$issues[$key_name] = pht('Required'); | $issues[$key_name] = pht('Required'); | ||||
} else if (!preg_match('/^[a-z0-9.]+$/', $values[$key_name])) { | } else if (!preg_match('/^[a-z0-9.]+\z/', $values[$key_name])) { | ||||
$errors[] = pht( | $errors[] = pht( | ||||
'JIRA instance name must contain only lowercase letters, digits, and '. | 'JIRA instance name must contain only lowercase letters, digits, and '. | ||||
'period.'); | 'period.'); | ||||
$issues[$key_name] = pht('Invalid'); | $issues[$key_name] = pht('Invalid'); | ||||
} | } | ||||
if (!strlen($values[$key_uri])) { | if (!strlen($values[$key_uri])) { | ||||
$errors[] = pht('JIRA base URI is required.'); | $errors[] = pht('JIRA base URI is required.'); | ||||
▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines |