feat: basic email validation
This commit is contained in:
@@ -42,6 +42,12 @@ const Login = () => {
|
|||||||
|
|
||||||
const submitForm = async (e: any) => {
|
const submitForm = async (e: any) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
if (!email.includes("@")) {
|
||||||
|
notify("error", "Please enter a valid email.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const { data } = await axios.post(
|
const { data } = await axios.post(
|
||||||
|
|||||||
Reference in New Issue
Block a user