Update app/models/champs/rna_champ.rb

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
This commit is contained in:
Damien Le Thiec 2022-10-11 16:34:00 +02:00 committed by GitHub
parent f30798eeec
commit 0e995c8bcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,7 @@
class Champs::RNAChamp < Champ class Champs::RNAChamp < Champ
validates :value, allow_blank: true, format: { validates :value, allow_blank: true, format: {
with: /\AW[0-9]{9}\z/, message: I18n.t(:not_a_rna, scope: 'activerecord.errors.messages') with: /\AW[0-9]{9}\z/, message: I18n.t(:not_a_rna, scope: 'activerecord.errors.messages')
} }, if: -> { validation_context != :brouillon }
delegate :id, to: :procedure, prefix: true delegate :id, to: :procedure, prefix: true