Skip to content

Commit

Permalink
fix(common): updated document schema so businessName may accept spaces (
Browse files Browse the repository at this point in the history
  • Loading branch information
Omri-Levy committed Oct 25, 2023
1 parent a095c7f commit 306ca46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fast-chefs-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ballerine/common': patch
---

businessName now may accept spaces
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const alphaNumeric = '^[a-zA-Z0-9]*$';

export const getGhanaDocuments = (): TDocument[] => {
const TypeAlphanumericString = Type.String({ pattern: '^[a-zA-Z0-9]*$' });
const TypeAlphanumericWithSpacesString = Type.String({ pattern: '^[\\sa-zA-Z0-9]*$' });
const TypePastDate = Type.String({
format: 'date',
formatMaximum: new Date().toISOString().split('T')[0],
Expand Down Expand Up @@ -688,7 +689,7 @@ export const getGhanaDocuments = (): TDocument[] => {
version: 1,
propertiesSchema: Type.Object({
certificateNumber: TypeAlphanumericString,
businessName: TypeAlphanumericString,
businessName: TypeAlphanumericWithSpacesString,
registrationNumber: Type.Optional(TypeAlphanumericString),
issueDate: TypePastDate,
}),
Expand Down

0 comments on commit 306ca46

Please sign in to comment.