From b26de03ede55c761c49a720743ceb2ffc0653748 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Wed, 21 Feb 2024 03:21:56 +0530 Subject: [PATCH] fix: BA - No validation error when emoji and certain symbols are entered in name field. Signed-off-by: Krishna Gupta --- .../ReimbursementAccount/PersonalInfo/substeps/FullName.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/ReimbursementAccount/PersonalInfo/substeps/FullName.tsx b/src/pages/ReimbursementAccount/PersonalInfo/substeps/FullName.tsx index 3f0470a873e2..412227570365 100644 --- a/src/pages/ReimbursementAccount/PersonalInfo/substeps/FullName.tsx +++ b/src/pages/ReimbursementAccount/PersonalInfo/substeps/FullName.tsx @@ -30,11 +30,11 @@ const STEP_FIELDS = [PERSONAL_INFO_STEP_KEY.FIRST_NAME, PERSONAL_INFO_STEP_KEY.L const validate = (values: FormOnyxValues): FormInputErrors => { const errors = ValidationUtils.getFieldRequiredErrors(values, STEP_FIELDS); - if (values.firstName && !ValidationUtils.isValidPersonName(values.firstName)) { + if (values.firstName && !ValidationUtils.isValidLegalName(values.firstName)) { errors.firstName = 'bankAccount.error.firstName'; } - if (values.lastName && !ValidationUtils.isValidPersonName(values.lastName)) { + if (values.lastName && !ValidationUtils.isValidLegalName(values.lastName)) { errors.lastName = 'bankAccount.error.lastName'; } return errors;