From 394e747a887d836df2f6aa4f817fc2a844dd4ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C4=B1dvan=20Akca?= Date: Fri, 3 Mar 2023 18:40:55 +0300 Subject: [PATCH] feat: remove helperText if there is no error --- .../src/components/SignUpForm/index.ee.tsx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/web/src/components/SignUpForm/index.ee.tsx b/packages/web/src/components/SignUpForm/index.ee.tsx index b2a85370..e3ed3726 100644 --- a/packages/web/src/components/SignUpForm/index.ee.tsx +++ b/packages/web/src/components/SignUpForm/index.ee.tsx @@ -15,8 +15,8 @@ import { yupResolver } from '@hookform/resolvers/yup'; import { LOGIN } from 'graphql/mutations/login'; const validationSchema = yup.object().shape({ - fullName: yup.string().required(), - email: yup.string().email().required(), + fullName: yup.string().trim().required(), + email: yup.string().trim().email().required(), password: yup.string().required(), confirmPassword: yup .string() @@ -24,7 +24,7 @@ const validationSchema = yup.object().shape({ .oneOf([yup.ref('password')], 'Passwords must match'), }); -const initialValue = { +const initialValues = { fullName: '', email: '', password: '', @@ -79,7 +79,7 @@ function SignUpForm() {