From 5003a0ced5cad1877898b77d11131232232eccd7 Mon Sep 17 00:00:00 2001 From: M Fikri A Date: Tue, 16 Nov 2021 14:09:08 +0700 Subject: [PATCH] Validate Non Valid Input Characters --- src/shared/components/Settings/Profile/BasicInfo/index.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/components/Settings/Profile/BasicInfo/index.jsx b/src/shared/components/Settings/Profile/BasicInfo/index.jsx index aa7e8c9711..9e96db632c 100644 --- a/src/shared/components/Settings/Profile/BasicInfo/index.jsx +++ b/src/shared/components/Settings/Profile/BasicInfo/index.jsx @@ -255,6 +255,10 @@ export default class BasicInfo extends ConsentComponent { case 'streetAddr2': newBasicInfo.addresses[0][e.target.name] = e.target.value; break; + case 'firstName': + case 'lastName': + newBasicInfo[e.target.name] = e.target.value.replace(/[^a-zA-Z0-9,.]/g, ''); + break; default: newBasicInfo[e.target.name] = e.target.value; }