wip(validates): prefill and validate_champ_value? on all other missing validation checks
This commit is contained in:
parent
284a10e235
commit
e08aa7d28b
16 changed files with 16 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
class Champs::DepartementChamp < Champs::TextChamp
|
||||
store_accessor :value_json, :code_region
|
||||
# TODO: if: -> { validate_champ_value? || validation_context == :prefill }
|
||||
validate :value_in_departement_names, unless: -> { value.nil? }
|
||||
validate :external_id_in_departement_codes, unless: -> { external_id.nil? }
|
||||
before_save :store_code_region
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue