-
- 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/constants/name-patterns.constant.ts b/static/js/constants/name-patterns.constant.ts
index 3699175bc..6f4f1a586 100644
--- a/static/js/constants/name-patterns.constant.ts
+++ b/static/js/constants/name-patterns.constant.ts
@@ -1,5 +1,5 @@
export default {
TEAM_PATTERN: '^[a-z][a-z0-9]+$',
- ROBOT_PATTERN: '^[a-z][a-z0-9_]{3,29}$',
- USERNAME_PATTERN: '^(?=.{4,30}$)([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
+ ROBOT_PATTERN: '^[a-z][a-z0-9_]{1,254}$',
+ USERNAME_PATTERN: '^(?=.{2,255}$)([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
};
\ No newline at end of file
diff --git a/static/js/directives/ui/namespace-input.js b/static/js/directives/ui/namespace-input.js
index ea153f3ef..9837d7290 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.