Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
samaradel committed Sep 19, 2024
1 parent b7a7836 commit 81af97c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/playground/src/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -780,9 +780,8 @@ export async function isAvailableName(grid: GridClient, name: string) {

export function validateSmtp(v: string) {
const emailValidation = isEmail("Please provide a valid email address.")(v);
const username = !v.includes("@");
if (username) {
return username;
const username = /[!@#$%^&*()_+-={}:<>?,./]/.test(v);

Check warning

Code scanning / CodeQL

Overly permissive regular expression range Medium

Suspicious character range that is equivalent to \[+,\\-.\\/0-9:;<=\].
if (username && emailValidation) {
return { message: "Please provide a valid input" };
}
return emailValidation;
}

0 comments on commit 81af97c

Please sign in to comment.