mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-09 05:18:01 +08:00
Added missing validation for protocol description. [SCI-408]
This commit is contained in:
parent
c6c169f744
commit
09405c667e
1 changed files with 2 additions and 1 deletions
|
@ -13,9 +13,10 @@ class Protocol < ActiveRecord::Base
|
||||||
in_repository_archived: 4
|
in_repository_archived: 4
|
||||||
}
|
}
|
||||||
|
|
||||||
auto_strip_attributes :name, nullify: false
|
auto_strip_attributes :name, :description, nullify: false
|
||||||
# Name is required when its actually specified (i.e. :in_repository? is true)
|
# Name is required when its actually specified (i.e. :in_repository? is true)
|
||||||
validates :name, length: { maximum: NAME_MAX_LENGTH }
|
validates :name, length: { maximum: NAME_MAX_LENGTH }
|
||||||
|
validates :description, length: { maximum: TEXT_MAX_LENGTH }
|
||||||
validates :organization, presence: true
|
validates :organization, presence: true
|
||||||
validates :protocol_type, presence: true
|
validates :protocol_type, presence: true
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue