Improve the error message for when a new org name doesn't pass the regex.

This commit is contained in:
yackob03 2014-02-06 19:59:10 -05:00
parent bd47b9adf4
commit b9a5e355eb
2 changed files with 5 additions and 2 deletions

View file

@ -111,7 +111,10 @@ def create_organization(name, email, creating_user):
return new_org
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):

View file

@ -54,7 +54,7 @@
<label for="orgName">Organization Name</label>
<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 }}"
data-placement="right">
data-placement="right" data-container="body">
<span class="description">This will also be the namespace for your repositories</span>
</div>