update translation
[tiramisu.git] / tiramisu / option.py
index 02d1cd8..23cbd27 100644 (file)
@@ -671,8 +671,10 @@ class DomainnameOption(Option):
                 raise ValueError(_("invalid value for {0}, must have dot"
                                    "").format(self._name))
         if len(value) > length:
-            raise ValueError(_("invalid value's length for {0} (max {1})"
-                               "").format(self._name, length))
+            raise ValueError(_("invalid domainname's length for {0} (max {1})").format(self._name, length))
+        if len(value) == 1:
+            raise ValueError(_("invalid domainname's length for {0} (min 2)"
+                               "").format(self._name))
         regexp = r'^[a-z]([a-z\d{0}-])*[a-z\d]$'.format(extrachar)
         if re.match(regexp, value) is None:
             raise ValueError(_('invalid domainname'))