Commit 4111d3d5642a11995c60af8c7a68c5c08b6f82a9

Authored by Rafael Martins
1 parent b67f8a16

Fix for domain name checkin (accepts single words now)

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
app/models/domain.rb
... ... @@ -8,9 +8,9 @@ class Domain < ActiveRecord::Base
8 8 # validations
9 9 #############
10 10  
11   - # <tt>name</tt> must be a sequence of word characters (a to z, plus 0 to 9,
12   - # plus '_'). Letters must be lowercase
13   - 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
  11 + # <tt>name</tt> must be sequences of alphanumeric characters (a to z,
  12 + # 0 to 9), plus '_' or '-', separated by dots. Letters must be lowercase.
  13 + 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
14 14  
15 15 # checks validations that could not be expressed using Rails' predefined
16 16 # validations. In particular:
... ...