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

  • Home
  • SEARCH
  • 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 8892309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:58:04+00:00 2026-06-14T22:58:04+00:00

I use for client validation the jquery plugin on the path assets\javascripts\jquery.validate.js (rails 3.2).

  • 0

I use for client validation the jquery plugin on the path assets\javascripts\jquery.validate.js (rails 3.2). But it doesn’t work. My form:

update_name_phone_city_user_registration_path,
:html => { :id => “form_edit_name”, :method => :put }, :remote => true) do |f| %>

10 %>

“submit” %>

My application.js file:

//= require jquery
//= require jquery_ujs
//= require bootstrap-modal
//= require_tree .


$(document).ready(function() {

$("#form_edit_name").validate({
   debug: true,
   rules: {
      "user[name]": {
        required: true,
        minlength: 2
      },
    "user[name]": {
      required: 'Your username is required',
      minlength: 'The minimum number of characters is 2'
     }

     alert("ok");
   });

});

What’s wrong?

UPD 1 The generated HTML- code

<script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-modal.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.validate.js?body=1" type="text/javascript"></script>
<script src="/assets/application.js?body=1" type="text/javascript"></script>


<form accept-charset="UTF-8" action="/users" class="edit_user" id="form_edit_name" method="post">
<div><label for="user_name">Name</label><br />
        <input id="user_name" name="user[name]" size="30" type="text" value="" /></div>
</form>
  • 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-06-14T22:58:05+00:00Added an answer on June 14, 2026 at 10:58 pm

    assuming you are validating a test input like this

    <input type="text" id="name" name="name" />
    

    try this

    $("#form_edit_name").validate({
           debug: true,
           rules: {
              "name": { required: true, minlength: 2 },
           messages: {
            "name": {
              required: 'Your username is required',
              minlength: 'The minimum number of characters is 2'
             }
          }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use jquery validation plugin and the remote attribute works with emailId but not
So I'm using jQuery and the validation plugin to validate form input on the
I am trying to use the jQuery validation plugin to add client side validation.
I am validating form using jquery validation plugin...... rules: { Name: required, MobileNo: {
I am trying to use jquery validator plugin and form submit via ajax in
I am using Jquery valdiation plugin for validating the form at client side. I
I am using jQuery to create a client-side validation function for a .NET form.
I would like to replace asp.net form validation with jQuery validation but not sure
I am trying to use the jquery globalization plugin (https://github.com/jquery/globalize) to work with asp.net
I would really like use the jQuery Validation plugin in my ASP.NET Web Forms

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.