mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
Merge pull request #1697 from okriuchykhin/ok_SCI_3264
Update limits for new rich text enabled fileds [SCI-3264]
This commit is contained in:
commit
6bb19ed0be
4 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@ class MyModule < ApplicationRecord
|
|||
validates :name,
|
||||
length: { minimum: Constants::NAME_MIN_LENGTH,
|
||||
maximum: Constants::NAME_MAX_LENGTH }
|
||||
validates :description, length: { maximum: Constants::TEXT_MAX_LENGTH }
|
||||
validates :description, length: { maximum: Constants::RICH_TEXT_MAX_LENGTH }
|
||||
validates :x, :y, :workflow_order, presence: true
|
||||
validates :experiment, presence: true
|
||||
validates :my_module_group, presence: true,
|
||||
|
|
|
@ -18,7 +18,7 @@ class Protocol < ApplicationRecord
|
|||
auto_strip_attributes :name, :description, nullify: false
|
||||
# Name is required when its actually specified (i.e. :in_repository? is true)
|
||||
validates :name, length: { maximum: Constants::NAME_MAX_LENGTH }
|
||||
validates :description, length: { maximum: Constants::TEXT_MAX_LENGTH }
|
||||
validates :description, length: { maximum: Constants::RICH_TEXT_MAX_LENGTH }
|
||||
validates :team, presence: true
|
||||
validates :protocol_type, presence: true
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ describe MyModule, type: :model do
|
|||
end
|
||||
it do
|
||||
should validate_length_of(:description)
|
||||
.is_at_most(Constants::TEXT_MAX_LENGTH)
|
||||
.is_at_most(Constants::RICH_TEXT_MAX_LENGTH)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -48,7 +48,7 @@ describe Protocol, type: :model do
|
|||
end
|
||||
it do
|
||||
should validate_length_of(:description)
|
||||
.is_at_most(Constants::TEXT_MAX_LENGTH)
|
||||
.is_at_most(Constants::RICH_TEXT_MAX_LENGTH)
|
||||
end
|
||||
end
|
||||
describe '.archive(user)' do
|
||||
|
|
Loading…
Reference in a new issue