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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:33:16+00:00 2026-06-02T18:33:16+00:00

hi i am using jquery validation plugin . i have a strange issue ,

  • 0

hi i am using jquery validation plugin .

i have a strange issue , i have a validaion like this

jQuery("#profile_info").validate({

    rules : {
        city : {
            required : true,
            minlength : 3,
            maxlength : 30,
            cityvalidation: true
        },
        state : {
            required : true,
            minlength : 3,
            maxlength : 30,
            cityvalidation: true
        }
    },
    messages : {
        city : {
            required : " City must be  filled in",
            minlength : "At least 3 characters long",
            maxlength : "Should not exceed 30 characters",
        },
        state : {
            required : " State must be  filled in",
            minlength : "At least 3 characters long",
            maxlength : "Should not exceed 30 characters",
        }
    }
});

and cityvalidation

jQuery.validator.addMethod("cityvalidation", function(value, element) {
      return this.optional(element) || /^[a-zA-Z\u0080-\u024F\s\/\-\)\(\`\.\"\']+$/i.test(jQuery.trim(value));
    }, "You Have Typed Unallowed Charactors");

my input fields are

                                                    <div class="select-date-container-side location-codes">
                                                        <input id="city" name="city"
                                                            value="<?php if(isset($profileinfo['CityName'])){echo $profileinfo['CityName'];}else if(isset($city)){echo $city;} ?>"
                                                            title="City" type="text"
                                                            class="smaler-textfield textfield clear-default"
                                                            tabindex="1900" />
                                                    </div>
                                                    <div class="select-date-container-middle location-codes">
                                                        <input id="state" name="state"
                                                            value="<?php if(isset($profileinfo['StateName'])){echo $profileinfo['StateName'];}else if(isset($state)){echo $state;} ?>"
                                                            title="State" type="text"
                                                            class="smaler-textfield textfield clear-default"
                                                            tabindex="1900" />
                                                    </div>

if the cityvalidation failed . "You Have Typed Unallowed Charactors" message , but instead of that the titles of the fields are shown .

enter image description here

  • if i remove the title it works perfectly . so what i suppoesed to do . i want to get the custom error message instead of title . please help……..

thanks in advance …………………

  • 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-02T18:33:18+00:00Added an answer on June 2, 2026 at 6:33 pm

    hmmm i found it .

    i used ignoreTitle: true,

    jQuery("#profile_info").validate({
    
    
        ignoreTitle: true,
    
        rules : {
            city : {
                required : true,
                minlength : 3,
                maxlength : 30,
                cityvalidation: true
            },
            state : {
                required : true,
                minlength : 3,
                maxlength : 30,
                cityvalidation: true
            }
        },
        messages : {
            city : {
                required : " City must be  filled in",
                minlength : "At least 3 characters long",
                maxlength : "Should not exceed 30 characters",
            },
            state : {
                required : " State must be  filled in",
                minlength : "At least 3 characters long",
                maxlength : "Should not exceed 30 characters",
            }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some strange issue using jQuery Validation plugin. Firs of all here is
I am using jquery validation plugin to validate my form. I have one field
I am using the jquery validation plugin to validate a form. I have the
I am using the jQuery Validation plugin and have an issue validating items that
I am using JQuery validation plugin to validate my form. I have a radio
I have started using jQuery Validation plugin 1.7. I have a wizard like interface
I'm using the jQuery validation plugin found here: http://plugins.jquery.com/project/validate In my form I have
I am using jquery validation plugin. I have an html that looks like: <h2>Select
I have am using the jQuery validation plugin (1.8.1 from MS CDN) to validate
Using this jQuery validation plugin. http://www.benjaminkeen.com/software/rsv/jquery/index.php I want to validate a checkbox group with

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.