From 66f933924c5109f5704273066fe75c71030483d5 Mon Sep 17 00:00:00 2001 From: pluto <99231462+pluto-bell@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:00:27 -0800 Subject: [PATCH] removed validate email, read note in pr --- client/src/pages/CheckInForm.jsx | 7 ------- client/src/utils/validateEmail.js | 4 ---- 2 files changed, 11 deletions(-) delete mode 100644 client/src/utils/validateEmail.js diff --git a/client/src/pages/CheckInForm.jsx b/client/src/pages/CheckInForm.jsx index 024063e7..7dc6be26 100644 --- a/client/src/pages/CheckInForm.jsx +++ b/client/src/pages/CheckInForm.jsx @@ -4,7 +4,6 @@ import NewUserForm from './../components/presentational/newUserForm'; import ReturnUserForm from './../components/presentational/returnUserForm'; import { REACT_APP_CUSTOM_REQUEST_HEADER as headerToSend } from '../utils/globalSettings'; import { format } from 'date-fns'; -import { validateEmail } from '../utils/validateEmail' import '../sass/CheckIn.scss'; @@ -304,12 +303,6 @@ const CheckInForm = (props) => { ready = false; } - if (userForm.email.length > 0 && !validateEmail(userForm.email) ) { - setIsError(true); - setErrorMessage("Please use a valid email address"); - ready = false; - } - const currYear = parseInt(moment().format('YYYY')); const currMonth = parseInt(moment().format('MM')); const yearJoined = parseInt(year); diff --git a/client/src/utils/validateEmail.js b/client/src/utils/validateEmail.js deleted file mode 100644 index ff78a111..00000000 --- a/client/src/utils/validateEmail.js +++ /dev/null @@ -1,4 +0,0 @@ -export const validateEmail = (email) => { - const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; - return re.test(email); - } \ No newline at end of file