chore(groupe instructeur): remove unused validation
This commit is contained in:
parent
fc2c196cfa
commit
03202f3e98
1 changed files with 1 additions and 8 deletions
|
@ -16,14 +16,7 @@ class GroupeInstructeur < ApplicationRecord
|
|||
|
||||
validates :label, presence: true, allow_nil: false
|
||||
validates :label, uniqueness: { scope: :procedure }
|
||||
validates :closed, acceptance: { accept: [false], message: I18n.t('.activerecord.errors.models.groupe_instructeur.defaut') }, if: -> { (self == procedure.defaut_groupe_instructeur) }
|
||||
validates :closed, acceptance: { accept: [false], message: 'Il doit y avoir au moins un groupe d’instructeurs actif sur chaque démarche' }, if: -> do
|
||||
if closed
|
||||
(other_groupe_instructeurs.map(&:closed) + [closed]).all?
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
validates :closed, acceptance: { accept: [false] }, if: -> { (self == procedure.defaut_groupe_instructeur) }
|
||||
|
||||
before_validation -> { label&.strip! }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue