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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:01:14+00:00 2026-05-27T04:01:14+00:00

function validate_email() { atsplit = $(‘input[name=email]’).val().split(‘@’); dotsplit = atsplit[1].split(‘.’); if (atsplit.length == 2 &&

  • 0
function validate_email() {
    atsplit = $('input[name=email]').val().split('@');
    dotsplit = atsplit[1].split('.');
    if (atsplit.length == 2 && atsplit[0].length > 0 && dotsplit[dotsplit.length-1].length > 0 && dotsplit[dotsplit.length-2].length > 0) {
        $('#email').html('✔');
        valid_email = true; 
    }
    else {
        $('#email').html('');
        valid_email = false;
    }
}
$('*').live('change click focusout keyup submit', function(){
    validate_email();
});

I’m trying to validate an email address. If the email is valid, a check mark is placed in the #email span. Everything works perfectly unless you highlight the input text and press the backspace key (or if you hold the backspace key so that the input is deleted in one keystroke). In these cases, the check mark remains regardless of what events are triggered (click, focusout, etc.). The behavior seems to be the same in all browsers. Any ideas what’s wrong?

  • 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-27T04:01:15+00:00Added an answer on May 27, 2026 at 4:01 am

    Try out this http://jsfiddle.net/Pq5Ut/ and let me know if that helps you out. I know I’m not using the same email validation that you are, but I feel it might be what you want.

    FYI, the email regex I’m using was just pulled from the jQuery validation plugin.

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

Sidebar

Related Questions

Markup: <input type=text name=email /> Code: $(':text').focusout(function(){ $(this).validate(function(){ $(this).attr('name'); }); }); Plugin: (function($){ $.fn.validate
<form method=post action=/Order/CheckOut/ onSubmit=return Validate()> and then... function Validate() { alert($(#email).val()); return false; }
I have a HTML page, with html-mode enabled. I call function sgml-validate to check
Here's my code: function validate_form(thisform) { with (thisform) { if (validate_required(name,Name must be filled
I am using the following javascript regex email validate function but it doen't seem
My jQuery code is: $(document).ready(function(){ $('#StudentRegisterForm').validate({ rules: { email: { required:true, email:true } }
What I expect on execution: The function Email() will be called each time the
EDIT: Solution...email is a function within Validate which is a class so you need
$(document).ready( function(){ $(#form1).validate( { rules: { email: { // compound rule required: true, email:
Trying to get this form to validate email using the function the professor said

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.