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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:43:19+00:00 2026-05-30T02:43:19+00:00

I have a php form that gets validated through javascript. I would like to

  • 0

I have a php form that gets validated through javascript. I would like to add another field to the form where the user has to confirm their email. How can I do this in the javascript validation file please?
Here is my current validation for the initial email form:

this.setHandler('email',
        function (value) {
            regex=/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
            return regex.test(value);
        }
    );
  • 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-30T02:43:20+00:00Added an answer on May 30, 2026 at 2:43 am

    Adapt something like this…

    this.setHandler('email-confirm',
        function (value) {
            return value == document.getElementsByTagName('email')[0].value;
        }
    );
    

    Assuming your confirm email‘s name (or whatever the first argument to setHandler()) is email-confirm, and the original email input’s name is email (and assuming it is the first element of such).

    Basically, I’m comparing the current value of the email-confirm to the original value, and if they are equal, the function returns true.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php form that has a known number of columns (ex. top
I have a php page that has a form that asks for an e-mail.
I have the following php array that gets all values from a form full
I have a form that allows the user to add as many upload forms
I'm using the CodeIgniter PHP framework. I have a simple form that has an
Usage: I have a form that has a select drop-down that's controlled by another
I have very simple form that gets values in JSON format from searchAlbum.php .
I currently have a PHP form that uses AJAX to connect to MySQL and
i have a PHP contact form that submits data, and an email...: <?php $dbh=mysql_connect
(Using MySQL and PHP) I have a search form that will allow my users

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.