2018-04-03 16:29:42 +02:00
|
|
|
class Champs::SiretChamp < Champ
|
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
|
|
|
|
|
|
|
def mandatory_and_blank?
|
|
|
|
mandatory? && Siret.new(siret: value).invalid?
|
|
|
|
end
|
2018-04-03 16:29:42 +02:00
|
|
|
end
|