From e3d5817420837ec3bca6203ddad355fe08a570da Mon Sep 17 00:00:00 2001 From: KimiaMontazeri Date: Wed, 29 Nov 2023 12:26:35 +0330 Subject: [PATCH] fix(signup): helper text of phone validation --- frontend/src/pages/Signup/Signup.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/pages/Signup/Signup.jsx b/frontend/src/pages/Signup/Signup.jsx index ac990ae..87f0af2 100644 --- a/frontend/src/pages/Signup/Signup.jsx +++ b/frontend/src/pages/Signup/Signup.jsx @@ -14,7 +14,6 @@ import { Helper } from '../../utils/Helper.js'; const validatePhone = (phone) => { const PHONE_LENGTH = 11; const phoneStr = String(phone); - // 09102014779 const lengthIsOk = phoneStr.length === PHONE_LENGTH; const startsWithZeroNine = phoneStr.startsWith('09'); return { @@ -57,7 +56,7 @@ const SignUpForm = ({ onLoginClick }) => { const { lengthIsOk, startsWithZeroNine } = validatePhone(phoneNumber); if (!lengthIsOk) { setIsPhoneWrong(true); - setPhoneHelperText('Phone number is two short'); + setPhoneHelperText('Phone number should be 11 digits'); return false; } if (!startsWithZeroNine) {