-
- Usernames with dots or dashes are incompatible with Docker version 1.8 or older
-
+
+
{{ backIncompatMessage }}
- Usernames must be alphanumeric and between four and thirty characters in length
+ Usernames must be alphanumeric and between 2 and 255 characters in length
diff --git a/static/js/app.js b/static/js/app.js
index fd163f262..650f6fe4d 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -1,6 +1,6 @@
var TEAM_PATTERN = '^[a-z][a-z0-9]+$';
-var ROBOT_PATTERN = '^[a-z][a-z0-9_]{3,29}$';
-var USERNAME_PATTERN = '^(?=.{4,30}$)([a-z0-9]+(?:[._-][a-z0-9]+)*)$';
+var ROBOT_PATTERN = '^[a-z][a-z0-9_]{1,254}$';
+var USERNAME_PATTERN = '^(?=.{2,255}$)([a-z0-9]+(?:[._-][a-z0-9]+)*)$';
// Define the pages module.
quayPages = angular.module('quayPages', [], function(){});
diff --git a/static/js/directives/ui/namespace-input.js b/static/js/directives/ui/namespace-input.js
index 422539c12..c124c71ba 100644
--- a/static/js/directives/ui/namespace-input.js
+++ b/static/js/directives/ui/namespace-input.js
@@ -10,7 +10,7 @@ angular.module('quay').directive('namespaceInput', function () {
restrict: 'C',
scope: {
'binding': '=binding',
- 'isBackIncompat': '=isBackIncompat',
+ 'backIncompatMessage': '=backIncompatMessage',
'hasExternalError': '=?hasExternalError',
'namespaceTitle': '@namespaceTitle',
@@ -21,11 +21,17 @@ angular.module('quay').directive('namespaceInput', function () {
$scope.$watch('binding', function(binding) {
if (!binding) {
- $scope.isBackIncompat = false;
+ $scope.backIncompatMessage = null;
return;
}
- $scope.isBackIncompat = (binding.indexOf('-') > 0 || binding.indexOf('.') > 0);
+ if (binding.indexOf('-') > 0 || binding.indexOf('.') > 0) {
+ $scope.backIncompatMessage = 'Namespaces with dashes or dots are only compatible with Docker 1.9+';
+ } else if (binding.length < 4 || binding.length > 30) {
+ $scope.backIncompatMessage = 'Namespaces less than 4 or more than 30 characters are only compatible with Docker 1.6+';
+ } else {
+ $scope.backIncompatMessage = null;
+ }
})
}
};
diff --git a/static/partials/new-organization.html b/static/partials/new-organization.html
index 359824673..4e5ea2a7c 100644
--- a/static/partials/new-organization.html
+++ b/static/partials/new-organization.html
@@ -42,16 +42,14 @@
-
-
-
- Organization names with dots or dashes are incompatible with Docker version 1.8 or older
+
+ {{ backIncompatMessage }}
- Organization names must be alphanumeric, be at least four characters in length and max thirty characters in length
+ Organization names must be alphanumeric, be at least 2 characters in length and max 255 characters in length
-
This will also be the namespace for your repositories. Must be alphanumeric, all lowercase, at least four characters long and at most thirty characters long.
+
This will also be the namespace for your repositories. Must be alphanumeric, all lowercase, at least 2 characters long and at most 255 characters long.