---
title: "How to validate email addresses using jQuery?"  
description: "How to validate email addresses using jQuery?"  
author: "Utpal Vishwas"  
published: 2023-05-11  
updated: 2023-05-11  
canonical: https://www.mindstick.com/forum/158283/how-to-validate-email-addresses-using-jquery  
category: "jquery"  
tags: ["jquery", "jquery validate", "html email", "form validation"]  
reading_time: 2 minutes  

---

# How to validate email addresses using jQuery?

How to [validate email](https://www.mindstick.com/forum/34240/how-to-validate-email-in-ios-objective-c) addresses using jQuery?

## Replies

### Reply by Aryan Kumar

There are many ways to [validate](https://www.mindstick.com/forum/1490/what-is-better-solution-for-validate-form-textboxs-value) [email](https://www.mindstick.com/articles/12870/10-easy-ways-to-manage-your-business-email-inbox) addresses using jQuery. Here are a few examples:

- **Use the validate-email plugin.** The validate-email plugin is a jQuery plugin that can be used to validate email addresses. The plugin supports a variety of different email address formats, including RFC 822 and RFC 6531. For example, the following code would validate an email address:

Code snippet

```plaintext
$(document).ready(function() {
  // Validate the form
  $("#myForm").validate({
    rules: {
      email: {
        required: true,
        validate-email: true
      }
    }
  });
});
```

- **Use a regular expression.** You can also use a regular expression to validate email addresses. For example, the following code would validate an email address:

Code snippet

```plaintext
$(document).ready(function() {
  // Validate the form
  $("#myForm").validate({
    rules: {
      email: {
        required: true,
        regexp: /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
      }
    }
  });
});
```

- **Use a custom validation function.** You can also create your own custom validation function to validate email addresses. For example, the following code would validate an email address:

Code snippet

```plaintext
$(document).ready(function() {
  // Validate the form
  $("#myForm").validate({
    rules: {
      email: {
        required: true,
        custom: function(value) {
          // Check if the value is a valid email address
          var re = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
          return re.test(value);
        }
      }
    }
  });
});
```

These are just a few examples of how to validate email addresses using jQuery. There are many other ways to validate email addresses, and the best approach will vary depending on your specific needs.


---

Original Source: https://www.mindstick.com/forum/158283/how-to-validate-email-addresses-using-jquery

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
