Skip to content

Commit

Permalink
fix: BA - No validation error when emoji and certain symbols are ente…
Browse files Browse the repository at this point in the history
…red in name field.

Signed-off-by: Krishna Gupta <[email protected]>
  • Loading branch information
Krishna2323 committed Feb 20, 2024
1 parent fe682d1 commit b26de03
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 b26de03

Please sign in to comment.