Skip to content

Commit fe8046a

Browse files
committed
max length on service name/description
1 parent a4abf7a commit fe8046a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/models/service.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ class Service < ApplicationRecord
8787
virtual_column :power_state, :type => :string
8888
virtual_column :power_status, :type => :string
8989

90-
validates :name, :presence => true
90+
validates :name, :presence => true, :length => {:maximum => 256}
91+
validates :description, :length => {:maximum => 1024}
9192

9293
default_value_for :visible, false
9394
default_value_for :initiator, 'user'

0 commit comments

Comments
 (0)