Allow dot at platform name. Refs #207

This commit is contained in:
Pavel Chipiga 2012-06-08 21:20:02 +03:00
parent 6435817163
commit c038b255a8
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class Platform < ActiveRecord::Base
validates :description, :presence => true
validates :visibility, :presence => true, :inclusion => {:in => VISIBILITIES}
validates :name, :uniqueness => {:case_sensitive => false}, :presence => true, :format => { :with => /^[a-zA-Z0-9_\-]+$/ }
validates :name, :uniqueness => {:case_sensitive => false}, :presence => true, :format => { :with => /^[a-zA-Z0-9_\-\.]+$/ }
validates :distrib_type, :presence => true, :inclusion => {:in => APP_CONFIG['distr_types']}
before_create :create_directory, :if => lambda {Thread.current[:skip]} # TODO remove this when core will be ready