actually start on mailing, fix email regex
Some checks failed
Code quality checks / biome (push) Failing after 22s
Some checks failed
Code quality checks / biome (push) Failing after 22s
This commit is contained in:
parent
00a7417936
commit
86be889ede
17 changed files with 349 additions and 32 deletions
|
@ -1,3 +1,4 @@
|
|||
export * from "./server";
|
||||
export * from "./validation";
|
||||
export * from "./database";
|
||||
export * from "./mailer";
|
||||
|
|
8
src/environment/constants/mailer.ts
Normal file
8
src/environment/constants/mailer.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { resolve } from "node:path";
|
||||
|
||||
export const templatesPath = resolve(
|
||||
"src",
|
||||
"environment",
|
||||
"mailer",
|
||||
"templates",
|
||||
);
|
|
@ -14,7 +14,7 @@ const forbiddenDisplayNamePatterns = [
|
|||
/[\r\n\t]/,
|
||||
/\s{3,}/,
|
||||
/^\s|\s$/,
|
||||
/#everyone|#here/i,
|
||||
/@everyone|@here/i,
|
||||
/\p{Cf}/u,
|
||||
/\p{Cc}/u,
|
||||
];
|
||||
|
@ -25,7 +25,7 @@ const passwordRestrictions: genericValidation = {
|
|||
};
|
||||
|
||||
const emailRestrictions: { regex: RegExp } = {
|
||||
regex: /^[^\s#]+#[^\s#]+\.[^\s#]+$/,
|
||||
regex: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
|
||||
};
|
||||
|
||||
export {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue