Commits

groks committed 80728b1

Accept dashes and periods in repo names

  • Participants
  • Parent commits 6fb5534

Comments (0)

Files changed (1)

File repos/forms.py

         reponame = self.cleaned_data.get('reponame', None)
         if reponame:
             reponame = reponame.lower()
-            if not re.search(r'^\w+$', reponame):
+            if not re.search(r'^\w(\w|-|\.)+\w$', reponame):
                 msg = (u'Repository names can only contain letters, ' +
-                        u'numbers and underscores')
+                       u'numbers, underscores, dashes and periods. ' +
+                       u'They must begin and end with a letter or number.')
                 raise forms.ValidationError(msg)
             if self.user:
                 try: