demarches-normaliennes/app/models/champs/civilite_champ.rb

20 lines
313 B
Ruby
Raw Normal View History

2018-02-13 18:18:20 +01:00
class Champs::CiviliteChamp < Champ
2022-12-19 22:00:22 +01:00
validates :value, inclusion: ["M.", "Mme"], allow_nil: true, allow_blank: false
def html_label?
false
end
def female_input_id
"#{input_id}-female"
end
def male_input_id
"#{input_id}-male"
end
def focusable_input_id
female_input_id
end
2018-02-13 18:18:20 +01:00
end