Repository: sweetalert2/sweetalert2 (js)

Issue:
Input Types - Email
### Current behavior

When create an alert with an input type of "email", it marks a valid email as invalid.
Example: jim.o'brien@domain.com
Error: Invalid email address

### Expected behavior

According to https://en.wikipedia.org/wiki/Email_address#Syntax and https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1 - That example email address is valid. You are allowed to have apostrophe's in your email address like that.

### Live demo !!! THIS FIELD IS REQUIRED !!!

The live demo: https://codepen.io/David-Ellsworth/pen/qBwBEQB
Type in "whatever.o'test@domain.com" or "jim.o'brien@domain.com"

Pull request:
fix: allow single quotes in default email validator
fixes #2715 

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Tests**
	- Added tests for email and URL validation using various formats.
- **Bug Fixes**
	- Updated email validation to support apostrophes in the local part of the email address.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Patch:
diff --git a/README.md b/README.md
index 5069a8de..82c7d954 100644
--- a/README.md
+++ b/README.md
@@ -66,11 +66,9 @@ NSFW Sponsors
 <table>
 <tr>
 <td align="center"><a href="https://vlixa.com/"><img src="https://sweetalert2.github.io/images/sponsors/vlixa.png" width="80"><br>Vlixa</a></td>
-<td align="center"><a href="https://taboodude.com/"><img src="https://sweetalert2.github.io/images/sponsors/taboodude.png" width="80"><br>TabooDude</a></td>
 <td align="center"><a href="https://sexsitoys.com/lovense-games/"><img src="https://sweetalert2.github.io/images/sponsors/sexsitoys.jpg" width="80"><br>Sexsi Toys</a></td>
 <td align="center"><a href="https://www.cheapestsexdolls.com"><img src="https://sweetalert2.github.io/images/sponsors/cheapestsexdolls.png" width="80"><br>CheapestSexDolls</a></td>
 <td align="center"><a href="https://www.bestblowjobmachines.com/"><img src="https://sweetalert2.github.io/images/sponsors/best-blowjob-machines.jpg" width="80"><br>Best Blowjob Machines</a></td>
-<td align="center"><a href="https://escortsear.ch/"><img src="https://sweetalert2.github.io/images/sponsors/escortsearch.jpg" width="80"><br>EscortSearch</a></td>
 </tr>
 </table>
 <table>
diff --git a/SPONSORS.md b/SPONSORS.md
index e9496961..07d411a9 100644
--- a/SPONSORS.md
+++ b/SPONSORS.md
@@ -58,11 +58,9 @@ NSFW Sponsors
 <table>
 <tr>
 <td align="center"><a href="https://vlixa.com/"><img src="https://sweetalert2.github.io/images/sponsors/vlixa.png" width="80"><br>Vlixa</a></td>
-<td align="center"><a href="https://taboodude.com/"><img src="https://sweetalert2.github.io/images/sponsors/taboodude.png" width="80"><br>TabooDude</a></td>
 <td align="center"><a href="https://sexsitoys.com/lovense-games/"><img src="https://sweetalert2.github.io/images/sponsors/sexsitoys.jpg" width="80"><br>Sexsi Toys</a></td>
 <td align="center"><a href="https://www.cheapestsexdolls.com"><img src="https://sweetalert2.github.io/images/sponsors/cheapestsexdolls.png" width="80"><br>CheapestSexDolls</a></td>
 <td align="center"><a href="https://www.bestblowjobmachines.com/"><img src="https://sweetalert2.github.io/images/sponsors/best-blowjob-machines.jpg" width="80"><br>Best Blowjob Machines</a></td>
-<td align="center"><a href="https://escortsear.ch/"><img src="https://sweetalert2.github.io/images/sponsors/escortsearch.jpg" width="80"><br>EscortSearch</a></td>
 </tr>
 </table>
 <table>
diff --git a/src/utils/defaultInputValidators.js b/src/utils/defaultInputValidators.js
index 47b18436..b319c235 100644
--- a/src/utils/defaultInputValidators.js
+++ b/src/utils/defaultInputValidators.js
@@ -5,7 +5,7 @@ export default {
    * @returns {Promise<string | void>}
    */
   email: (string, validationMessage) => {
-    return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string)
+    return /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(string)
       ? Promise.resolve()
       : Promise.resolve(validationMessage || 'Invalid email address')
   },


Test patch:
diff --git a/cypress/e2e/inputs.cy.js b/cypress/e2e/inputs.cy.js
index a7cc2c94..079295cc 100644
--- a/cypress/e2e/inputs.cy.js
+++ b/cypress/e2e/inputs.cy.js
@@ -585,20 +585,44 @@ describe('Validation', () => {
     }, TIMEOUT)
   })
 
+  it('default email validator: test@example.com', (done) => {
+    defaultInputValidators.email('test@example.com').then((data) => {
+      expect(data).be.undefined
+      done()
+    })
+  })
+
+  it(`default email validator: o'test@example.com`, (done) => {
+    defaultInputValidators.email(`o'test@example.com`).then((data) => {
+      expect(data).be.undefined
+      done()
+    })
+  })
+
+  it(`default email validator: invalid email`, (done) => {
+    defaultInputValidators.email(`invalid email@example.com`).then((data) => {
+      expect(data).to.equal('Invalid email address')
+      done()
+    })
+  })
+
   it('default URL validator: https://google.com', (done) => {
-    defaultInputValidators.url('https://google.com').then(() => {
+    defaultInputValidators.url('https://google.com').then((data) => {
+      expect(data).be.undefined
       done()
     })
   })
 
   it('default URL validator: http://g.co', (done) => {
-    defaultInputValidators.url('http://g.co').then(() => {
+    defaultInputValidators.url('http://g.co').then((data) => {
+      expect(data).be.undefined
       done()
     })
   })
 
   it('default URL validator: http://foo.localhost/', (done) => {
-    defaultInputValidators.url('http://foo.localhost/').then(() => {
+    defaultInputValidators.url('http://foo.localhost/').then((data) => {
+      expect(data).be.undefined
       done()
     })
   })