From 1aad327dfda3d0d3f1deb30e9a38bb6ffa74d398 Mon Sep 17 00:00:00 2001 From: Rashmi-278 Date: Fri, 24 May 2024 15:34:14 +0530 Subject: [PATCH] clear errors if none --- .../components/Register/RegistrationForm/RegistrationForm.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daostar-website/src/components/Register/RegistrationForm/RegistrationForm.js b/daostar-website/src/components/Register/RegistrationForm/RegistrationForm.js index e44f9ad..3c07b9b 100644 --- a/daostar-website/src/components/Register/RegistrationForm/RegistrationForm.js +++ b/daostar-website/src/components/Register/RegistrationForm/RegistrationForm.js @@ -395,6 +395,9 @@ const RegistrationForm = ({ toggleRegScreen, setRegistrationData }) => { window.scrollTo(0, 0); return; } + if (validationErrors.length === 0) { + setErrors(null); + } const data = fields.map(({ name, value, type }) => ({ name, value, type }));