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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:40:39+00:00 2026-06-06T22:40:39+00:00

I have a textbox with ID name, I want to do validation when the

  • 0

I have a textbox with ID “name”, I want to do validation when the text box get onblur function. The below code doesn’t work. What’s wrong with me?

  $(function() {
    $('name').validate({
      rules:{ "name": {required: true, minlength: 5 } }
    });
    $('name').blur(function(){
      $('name').validate()
    });
  };
  • 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-06T22:40:42+00:00Added an answer on June 6, 2026 at 10:40 pm

    Working Demo http://jsfiddle.net/qC2Ya/ or this one is way more shorter and cooler http://jsfiddle.net/XdAkv/

    All you need to do is add an element validation on blur event and that will work like a rocket.

    See validation element api : http://docs.jquery.com/Plugins/Validation/Validator/element#element

    Hope this helps :)

    code

    var v = $("form").validate({
        submitHandler: function() {
            console.log('successful submit');
            return false;
        }
    });
    
    $('#firstName').blur(function(){
       v.element('#firstName');
    });
    
    $('#lastName').blur(function(){
       v.element('#lastName');
    });
    

    OR from second demo

    $("form").validate({
        submitHandler: function() {
            console.log('successful submit');
            return false;
        }
    });
    
    $('#firstName,#lastName').blur(function(){
        $("form").validate().element($(this))
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text box like below : <asp:TextBox ID=headertxtUserName runat=server Text=User Name onfocus=onfocusOfUserName(this);
I have a text box with event name and two calendar controls to get
Below I have a jquery code which includes a textbox where the user can
i have asp text box and button control. <asp:TextBox ID=txtFName runat=server CssClass=sfInputbox></asp:TextBox> <asp:Button runat=Server
I have a TextBox named tb1 (Not real name). I want to, when I
I have a form with Name textbox Address textbox Phone textbox Insert buttion and
What's the best way to have the following? Name: [Textbox] Inside a div? I
I have a TextBox and a Popup control. I want the Popup.IsOpen property to
I have html textbox and I want it to check by PHP and jQuery
I have a TextBox (which shows notes). Now the user Selects his/her name and

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.