Updated validations and routes to support dots in project names
This commit is contained in:
parent
822c0a5060
commit
926f3013c2
2 changed files with 5 additions and 5 deletions
|
@ -25,7 +25,7 @@ class Project < ActiveRecord::Base
|
|||
validates :path,
|
||||
:uniqueness => true,
|
||||
:presence => true,
|
||||
:format => { :with => /^[a-zA-Z0-9_\-]*$/,
|
||||
:format => { :with => /^[a-zA-Z0-9_\-\.]*$/,
|
||||
:message => "only letters, digits & '_' '-' allowed" },
|
||||
:length => { :within => 0..255 }
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Project < ActiveRecord::Base
|
|||
validates :code,
|
||||
:presence => true,
|
||||
:uniqueness => true,
|
||||
:format => { :with => /^[a-zA-Z0-9_\-]*$/,
|
||||
:format => { :with => /^[a-zA-Z0-9_\-\.]*$/,
|
||||
:message => "only letters, digits & '_' '-' allowed" },
|
||||
:length => { :within => 3..255 }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue