Fix email form regex 🤦
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
const formData = new FormData(target)
|
||||
const email = String(formData.get('email'))
|
||||
|
||||
if (email && email.match('/^([\w.-])+@([\w.-])+\.([a-zA-Z])+/')) {
|
||||
if (email && email.match(/^([\w.-])+@([\w.-])+\.([a-zA-Z])+/)) {
|
||||
const req = await fetch('/api/newsletter', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'text/plain' },
|
||||
|
||||
Reference in New Issue
Block a user