Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 60090a0

Browse files
author
Manuel Proß
committed
feat(FE): remove required validator due to missing complexity, add simple email validator
1 parent 1a88ad7 commit 60090a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web/src/helpers/validators.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
export const isRequiredValidator = (value: string) => {
2-
return value ? undefined : 'Required';
1+
export const getMailValidation = (email: string) => {
2+
const regEx = /\S+@\S+\.\S+/;
3+
return regEx.test(email) ? undefined : 'Invalid email address';
34
};

0 commit comments

Comments
 (0)