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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:48:22+00:00 2026-05-22T18:48:22+00:00

On a form, I need to make sure that all fields are filled in

  • 0

On a form, I need to make sure that all fields are filled in and that the phone # and email address are valid. I tried using a jQuery validation plugin but it changed the page’s look and feel. The plugin also was dynamically looking for some css files in some spot that was unexpected.

I love jQuery but the plugin seemed too much for what I wanted.

Since all I need to do is to make sure the fields are not empty and that the phone number is valid and email is valid, what javascript functions do you suggest? I will still use jQuery core.

Serverside we want to use apache commons PhoneNumberFormatter and same with email validation.

Thanks!

  • 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-22T18:48:22+00:00Added an answer on May 22, 2026 at 6:48 pm

    I think you’re looking for JavaScript regular expressions, using the RegExp object that comes as a standard part of JavaScript. You can use that to perform basic checking of email addresses and phone numbers.

    e.g.

    function emailIsValid(emailAddress) {
      var emailRegex = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/;
      return !!emailAddress.match(emailRegex);
    }
    

    The code above is not tested, but it should give you an idea of how to do it. Just do the same again for the telephone number, and then do something like this:

    if (emailIsValid(emailAddressValue) && telephoneNumberIsValid(telephoneValue)) {
      //Submit form
    } else {
      alert ("There are errors on the form, please correct and invalid data");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make sure that either the text was entered into the form's
I have a form and need to check to make sure any child inputs
So to support multilanguage on the site I need to make sure all data
I need to test a web form that takes a file upload. The filesize
I have a form object that is being filled correctly automagically by Spring. Within
So I need to make new survey forms that are huge and I'm getting
I have a contact form that is being submitted, I have PHP validation all
here is some code that I plan on using in a registration form for
So I am writing a registration form and I need the display name to
I need to accept form data to a WCF-based service. Here's the interface: [OperationContract]

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.