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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:14:28+00:00 2026-05-26T02:14:28+00:00

i am using a form with several textbox elements which i want to validate

  • 0

i am using a form with several textbox elements which i want to validate and few which i dont want to, i am using jquery .not() for this but i am not getting the desired result am i making some ayntax error or something here is my code

function validateRegisterClick(){
    var isValid = true;
    // Validate User Information.
    $('input[type=text], input[type=password]').not(':input[id$=txtMob], :input[id$=txtOfficeNo]').each(function () {
            if ($(this).val().length <= 0) {
                $(this).next()
                       .fadeIn('slow')
                       .removeClass()
                       .addClass('failure')
                       .fadeIn('slow')
                       .text("Can't be blank.");
                isValid = false;
            }
});
}

it also includes the txtMob and txtOfficeNo as i am using external javascript file so i am using this syntax
–thanks
Mac

  • 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-26T02:14:29+00:00Added an answer on May 26, 2026 at 2:14 am

    changing the line in my above code solves the problem:

    $('input[type=text], input[type=password]').not(':input[type=text][id$=txtMob], :input[type=text][id$=txtOfficeNo]').each(function ()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My form has several <p> elements which are added dynamically. This is how one
i am using form authentication for my website which is written in ASP.Net, but
Using Zend_Form, how would I create form elements like this: <input type=text name=element[1] value=
trying to develop web form using jquery. all i need is to have several
I am using a dropdown which displays several form fields after you choose something
I have a form with several fields and using jQuery validation plugin. My input
I have a form that is generated based on several DataTemplate elements. One of
I have a form with several textboxes and other controls. I'm using the errorprovider
Total beginner question about jQuery: I have a Form that contains several TextBoxes (input
I'm writing a pretty complex web form using ASP.NET Dynamic Data. Several of the

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.