Skip to content

Commit 4ce5f9b

Browse files
authored
fix: strip regex delimiters so email validation works (#187)
useContactForm feeds validation_pattern straight to new RegExp(), so the /.../ delimiters were treated as literal characters and rejected every valid email.
1 parent bbce632 commit 4ce5f9b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

data/contact.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
"service_id": "service_lyt547p",
4646
"template_id": "template_yz438w6",
4747
"public_key": "PAcL61ygLI8WYG16R",
48-
"validation_pattern": "/^[\\w.%+-]+@[\\w.-]+\\.[a-zA-Z]{2,}$/"
48+
"validation_pattern": "^[\\w.%+-]+@[\\w.-]+\\.[a-zA-Z]{2,}$"
4949
}
5050
}

0 commit comments

Comments
 (0)