MCPcopy
hub / github.com/Peppermint-Lab/peppermint / validateEmail

Function validateEmail

apps/api/src/controllers/ticket.ts:19–25  ·  view source on GitHub ↗
(email: string)

Source from the content-addressed store, hash-verified

17import { prisma } from "../prisma";
18
19const validateEmail = (email: string) => {
20 return String(email)
21 .toLowerCase()
22 .match(
23 /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
24 );
25};
26
27export function ticketRoutes(fastify: FastifyInstance) {
28 // Create a new ticket - public endpoint, no preHandler needed

Callers 1

ticketRoutesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected