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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:16:34+00:00 2026-05-22T21:16:34+00:00

I am reading a text field, and converting that value to Lower case and

  • 0

I am reading a text field, and converting that value to Lower case and
comparing to the array of words, if it matches it throws error.

But the problem is when we enter a text as a Alpha Numeric value, then I am not able to convert Lower case letters
and getting the Run Time error as “Object is Not Defined”

if(streetAddress != null){
    for(var k=0; k<notValidPostalChars.length; k++){

        var secondWord = notValidPostalChars[k];

        if (streetAddress.toLowerCase().startsWith(stopWord.toLowerCase())) {
            alert("Invalid Error Message");
            document.getElementById("address").focus();
        return false;
        }

    }
}

In the above Example, streetAddress may contain the Alpha Numeric as well and it might be in the Lower case or Upper case letters.

This will be entered by the End users and notValidPostalChars is an Array consisting of all the Pre defined Words with UPPER CASE letters

  • 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-22T21:16:35+00:00Added an answer on May 22, 2026 at 9:16 pm

    Maybe stopWord is not defined?

    var secondWord = notValidPostalChars[k];
    if (streetAddress.toLowerCase().startsWith(stopWord.toLowerCase())) {
    //                                         ^did you mean secondWord?
       alert("Not invalid mesage");
    //       ^ did you mean 'invalid message / not a valid message'?
       document.getElementById("address").focus();
       return false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm reading the value of an input text field and passing it to be
I have a text field, whose value I am reading. I want to only
I'm reading a text file via CGI in, in perl, and noticing that when
I'm reading lines of text that can come in any order. The problem is
Here's the use case: I have this long form with group of field that
I'm reading text from a flat file in c# and need to test whether
If I'm reading a text file in shared access mode and another process truncates
I am reading a text file with this format: grrr,some text,45.4321,54.22134 I just have
I am reading a text file which contains numbers in the range [1, 10^100].
I have a simple text reading code for Visual Basic: Dim fileReader As String

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.