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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:34:24+00:00 2026-06-18T11:34:24+00:00

Im using Joren Rapini’s validation code to for my online form. Joren’s Website It

  • 0

Im using Joren Rapini’s validation code to for my online form. Joren’s Website

It allows you to check to see if an email address has been correctly entered, but I have 2 email addresses that I want to validate in the form.

Any idea how I would do this?

I’ve tried adding in email = $(“#youremail”); as well as the one that’s currently in the code which is email = $(“#receiveremail”); but it only works for one.

$(document).ready(function(){
    // Place ID's of all required fields here.
    required = ["youremail", "name", "receiveremail", "message"];

    // If using an ID other than #email or #error then replace it here
    email = $("#receiveremail");
    errornotice = $("#error");

    // The text to show up within a field when it is incorrect
    emptyerror = "Please fill out this field";
    emailerror = "Not a vaild email";
});
  • 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-18T11:34:25+00:00Added an answer on June 18, 2026 at 11:34 am

    You need to run the validation code for your other field

    in document.ready

    otheremail = $("#otheremail");
    

    in form submit

    if (!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(otheremail .val())) {
                otheremail .addClass("needsfilled");
                otheremail .val(emailerror);
            }
    

    No offense to Joren Rapini but this code is hacky and shouldn’t be used for other than the smallest purpose.

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

Sidebar

Related Questions

Using MongoDB C# Driver (official form 10gen), I'm doing the following code: using (database.RequestStart())
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I have a simple email form: <form method=post action=process-form.php id=emailForm name=emailForm target=_self> <h4>Sign up
Using C++ preprocessor directives, is it possible to test if a preprocessor symbol has
I'm using the excellent jquery.validation plugin by Jörn Zaefferer and I was wondering whether
Using this code, the following execution yields strange results: C 100 R W The
using this code: Java Server side: ... out = new PrintWriter(this.client.getOutputStream(), true); ... public
Using Android NDK is it possible (from native C-code) to get a list of
Using the DateTime class, if I try to run the following code: $mydate =
Using CMake I want to check if a particular function (cv::getGaborKernel) from OpenCV library

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.