From 4111d3d5642a11995c60af8c7a68c5c08b6f82a9 Mon Sep 17 00:00:00 2001 From: Rafael Martins Date: Thu, 23 Feb 2012 04:00:39 -0200 Subject: [PATCH] Fix for domain name checkin (accepts single words now) --- app/models/domain.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index 6c7d0f0..edb0f48 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -8,9 +8,9 @@ class Domain < ActiveRecord::Base # validations ############# - # name must be a sequence of word characters (a to z, plus 0 to 9, - # plus '_'). Letters must be lowercase - validates_format_of :name, :with => /^([a-z0-9_-]+\.)+[a-z0-9_-]+$/, :message => N_('%{fn} must be composed only of lowercase latters (a to z), numbers (0 to 9), "_" and "-"').fix_i18n + # name must be sequences of alphanumeric characters (a to z, + # 0 to 9), plus '_' or '-', separated by dots. Letters must be lowercase. + validates_format_of :name, :with => /^([a-z0-9_-]+\.)+[a-z0-9_-]+$/, :message => N_('%{fn} must be composed of sequences of lowercase letters (a to z), numbers (0 to 9), "_" and "-", separated by dots.').fix_i18n # checks validations that could not be expressed using Rails' predefined # validations. In particular: -- libgit2 0.21.2