Improve the error message for when a new org name doesn't pass the regex.
This commit is contained in:
parent
bd47b9adf4
commit
b9a5e355eb
2 changed files with 5 additions and 2 deletions
|
@ -111,7 +111,10 @@ def create_organization(name, email, creating_user):
|
||||||
|
|
||||||
return new_org
|
return new_org
|
||||||
except InvalidUsernameException:
|
except InvalidUsernameException:
|
||||||
raise InvalidOrganizationException('Invalid organization name: %s' % name)
|
msg = ('Invalid organization name: %s Organization names must consist ' +
|
||||||
|
'solely of lower case letters, numbers, and underscores. ' +
|
||||||
|
'[a-z0-9_]') % name
|
||||||
|
raise InvalidOrganizationException(msg)
|
||||||
|
|
||||||
|
|
||||||
def create_robot(robot_shortname, parent):
|
def create_robot(robot_shortname, parent):
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<label for="orgName">Organization Name</label>
|
<label for="orgName">Organization Name</label>
|
||||||
<input id="orgName" name="orgName" type="text" class="form-control" placeholder="Organization Name"
|
<input id="orgName" name="orgName" type="text" class="form-control" placeholder="Organization Name"
|
||||||
ng-model="org.name" required autofocus data-trigger="manual" data-content="{{ createError }}"
|
ng-model="org.name" required autofocus data-trigger="manual" data-content="{{ createError }}"
|
||||||
data-placement="right">
|
data-placement="right" data-container="body">
|
||||||
<span class="description">This will also be the namespace for your repositories</span>
|
<span class="description">This will also be the namespace for your repositories</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Reference in a new issue