d6fa7c134a9b44358753919d70bc1a0bd05f1f75
1 export function checkNameEmail(o
) {
2 if (typeof o
.name
=== "string") {
3 if (o
.name
.length
== 0) return "Missing name";
4 if (!o
.name
.match(/^[\w-]+$/))
5 return "Name: alphanumerics, hyphen and underscore";
8 if (typeof o
.email
=== "string") {
9 if (o
.email
.length
== 0) return "Missing email";
10 if (!o
.email
.match(/^[\w.+-]+@[\w.+-]+$/)) return "Invalid email";