2018-04-03 16:29:42 +02:00
|
|
|
class Champs::SiretChamp < Champ
|
2023-01-09 15:29:18 +01:00
|
|
|
include SiretChampEtablissementFetchableConcern
|
|
|
|
|
2018-07-25 19:34:06 +02:00
|
|
|
def search_terms
|
2018-12-24 17:29:46 +01:00
|
|
|
etablissement.present? ? etablissement.search_terms : [value]
|
2018-07-25 19:34:06 +02:00
|
|
|
end
|
2019-03-28 11:28:27 +01:00
|
|
|
|
2022-10-17 10:38:23 +02:00
|
|
|
def mandatory_blank?
|
2022-08-08 17:17:52 +02:00
|
|
|
mandatory? && Siret.new(siret: value).invalid?
|
2019-03-28 11:28:27 +01:00
|
|
|
end
|
2018-04-03 16:29:42 +02:00
|
|
|
end
|