I am trying to tweak Devise helper in order to show the error message only, not the field name.
Here is what Devise code looks like:
messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join
My problem is that it shows both the field name and message like:
Phone number Phone number is missing
I want the message only
EDIT EDIT
My actual model phone number validation looks like this :
validates :phone_number, presence: {message: "Nous avons besoin de votre numéro de téléphone"}
validates :phone_number, format: { with: /\A(?:[+\d].*\d|\d)\z/, message: "le format de votre numéro de téléphone n'est pas reconnu" }
Basically the presence message is "We require your phone number" which makes something like :
phone number Nous avons besoin de votre numéro de téléphone
(I know I am not using locales but I will move everything in fr.yml once it is ok)