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 3425064
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:32:58+00:00 2026-05-18T06:32:58+00:00

I’m using Rails with the JQuery plugin, and have some really complicated validations for

  • 0

I’m using Rails with the JQuery plugin, and have some really complicated validations for one of my forms that I decided to use JQuery for. For very simplified example, the fields A1, A2, … A4, B1 – B4, and C1 – C4. Just a few of the rules are:

  • if a user inputs any data into A,B, or C, then they MUST input into all four fields.
  • if a user inputs any data into A or B, they must also complete the other (B or A).
  • no fields’s value may differ from it’s neighbor by more than 10%

Actually only the average of A, average of B, and average of C are stored in the database / model, so I’m relying totally on client-side JQuery that I wrote to validate (all in application.js). I finally got this working quite smoothly. My rails model is not bothering itself with any of these validations.

The problem is, I need to be able to grab the error messages from Rails, because of i18n ( I need English and Chinese). For example “Field is required” or “Must be a number”. I am using i18n successfully with the rest of my app… I just don’t know how to use it with JQuery.

Any ideas how to do this, or points in the right direction?

(I should note that I never used JQuery or Javascript before 3 days ago, so I’m a pretty big newb in this area)

  • 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-18T06:32:59+00:00Added an answer on May 18, 2026 at 6:32 am

    For i18N you can use jQuery.i18n.properties plugin. I am using it in my app, its easy to integrate.

    http://keith-wood.name/localisation.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.