Skip to content

Commit

Permalink
Merge pull request #37052 from Krishna2323/krishna2323/issue/32291
Browse files Browse the repository at this point in the history
fix: BA - No validation error when emoji and certain symbols are entered in name field
  • Loading branch information
NikkiWines authored Feb 22, 2024
2 parents 7f51d03 + f761ccf commit 392efc7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const STEP_FIELDS = [PERSONAL_INFO_STEP_KEY.FIRST_NAME, PERSONAL_INFO_STEP_KEY.L

const validate = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM>): FormInputErrors<typeof ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM> => {
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;
Expand Down

0 comments on commit 392efc7

Please sign in to comment.