fix(Champs::CiviliteChamp): validates Champs::CiviliteChamp respecting it's validation context.
This commit is contained in:
parent
94ea16c894
commit
ff527517c9
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
||||||
class Champs::CiviliteChamp < Champ
|
class Champs::CiviliteChamp < Champ
|
||||||
validates :value, inclusion: ["M.", "Mme"], allow_nil: true, allow_blank: false
|
validates :value, inclusion: ["M.", "Mme"],
|
||||||
|
allow_nil: true,
|
||||||
|
allow_blank: false,
|
||||||
|
if: -> { validate_champ_value? || validation_context == :prefill }
|
||||||
|
|
||||||
def legend_label?
|
def legend_label?
|
||||||
true
|
true
|
||||||
|
|
Loading…
Reference in a new issue