From b9a5e355eba80f736c070dd06edefe9da9b53704 Mon Sep 17 00:00:00 2001 From: yackob03 Date: Thu, 6 Feb 2014 19:59:10 -0500 Subject: [PATCH] Improve the error message for when a new org name doesn't pass the regex. --- data/model.py | 5 ++++- static/partials/new-organization.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/model.py b/data/model.py index dc478b682..c44568dc2 100644 --- a/data/model.py +++ b/data/model.py @@ -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): diff --git a/static/partials/new-organization.html b/static/partials/new-organization.html index 79d29e3f9..05abfe185 100644 --- a/static/partials/new-organization.html +++ b/static/partials/new-organization.html @@ -54,7 +54,7 @@ + data-placement="right" data-container="body"> This will also be the namespace for your repositories