Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7435339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:03:30+00:00 2026-05-29T10:03:30+00:00

How can ActiveRecord full error messages be translated? For example, I want to show

  • 0

How can ActiveRecord full error messages be translated?
For example, I want to show them in spanish.

I create this file config/locales/es.yml:

es:
  errors:
    attributes:
      email:
        blank: "El email no puede estar en blanco"

But when submitting a form with a presence: true, validation is including the attribute always at the beginning of the message:

Email El email no puede estar en blanco

The first “Email” word is not necessary. How can I get rid of it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:03:31+00:00Added an answer on May 29, 2026 at 10:03 am

    Ok, after much reading and re-reading the official i18n guide, I discovered in the section 5.2.2 this:

    ActiveModel::Errors#full_messages prepends the attribute name to the
    error message using a separator that will be looked up from
    errors.format (and which defaults to “%{attribute} %{message}”).

    So, the solution is to configure the format, like this:

    es:
      errors:
        format: "%{message}"
        attributes:
          email:
            blank: "El email no puede estar en blanco"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me what's wrong with this code? class Dataset < ActiveRecord::Base has_many
Can't wrap my head around this... class User < ActiveRecord::Base has_many :fantasies, :through =>
In active_record/base.rb, module ActiveRecord you can see this code: delegate :find, :first, :last, :all,
I'm aware that I can check an ActiveRecord through the rails console but it
Using Castle ActiveRecord / NHibernate: Is there a way you can force an ICriterion
I have a JSON array with ActiveRecord objects. These objects can be reconstructed using
If I have... class Bunny < ActiveRecord::Base has_many :carrots end ...how can I check
This are my models: class Speaker < ActiveRecord::Base belongs_to :session, :foreign_key => :session_id, :class_name
How can I return errors messages from a cross reference table with multiple records
I just can't seem to figure this one out... As far as I know,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.