From 372e3e4546363a0fb2c36271bd267c50130ecb27 Mon Sep 17 00:00:00 2001 From: Anurup Reddy Date: Tue, 1 Apr 2025 21:15:13 -0500 Subject: [PATCH] Fix: Add LoginID validation and remove whitespace before submission --- src/adminApp/AccountOrgAdminUser.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/adminApp/AccountOrgAdminUser.js b/src/adminApp/AccountOrgAdminUser.js index 0809c6199..8c5fa20d1 100644 --- a/src/adminApp/AccountOrgAdminUser.js +++ b/src/adminApp/AccountOrgAdminUser.js @@ -33,7 +33,8 @@ import { PasswordTextField, UserFilter, UserTitle, - validateEmail + validateEmail, + validateUserName } from "./UserHelper"; import { TitleChip } from "./components/TitleChip"; import OrganisationService from "../common/service/OrganisationService"; @@ -138,13 +139,11 @@ const UserForm = ({ edit, user, region, ...props }) => { return ( - !isEmpty(newVal) && dispatch(change(REDUX_FORM_NAME, "username", newVal + getSuffixIfApplicable)) - } - {...rest} + format={value => (value ? value.replace(/\s+/g, "") : "")} + parse={value => (value ? value.replace(/\s+/g, "") + getSuffixIfApplicable : "")} /> {getSuffixIfApplicable}