Skip to content

Commit

Permalink
feat: extend legal entity pattern to support all language (eclipse-tr…
Browse files Browse the repository at this point in the history
  • Loading branch information
typecastcloud authored Oct 16, 2024
1 parent 38246d5 commit c10e8da
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

- **Service Subscriptions**
- rename 'Configure' button to 'Activate' button [#1150](https://github.com/eclipse-tractusx/portal-frontend/pull/1150)
- **Business Partner Invitation**
- support all language characters for company names [#1189](https://github.com/eclipse-tractusx/portal-frontend/pull/1189)

### Bugfixes

Expand Down
23 changes: 23 additions & 0 deletions src/types/Patterns.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,29 @@ const TESTDATA = {
'La Poste S.A.',
'JPMORGAN ASIA-PACIFIC ADVANTAGE HYBRID FUND (QDII)',
'Currency £$€¥¢',
'ACE 9 SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ',
'摩根亚太优势混合型证券投资基金 (QDII)',
'삼성', // Samsung
'三', // Samsung
'Czech: ČĎŇŘŠŤŽ',
'Estonian: ÄÖÜŠŽ',
'Slovak: ĽĹŔŠŤŽ',
'Polish: ĄĆĘŁŃÓŚŹŻ',
'Hungarian: ÁÉÍÓÖŐÚÜŰ',
'Romanian: ÂÎŞŢ',
'Bulgarian: ЙЪЬ',
'Greek: ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ',
'Turkish: ÇĞİıÖŞÜ',
'Arabic: ابتثجحخدذرزسشصضطظعغفقكلمنهوي',
'Hebrew: שלום עולם',
'Hindi: अआइईउऊऋएऐओऔकखगघङचछजझञटठडढणतथदधनपफबभमयरलवशषस',
'Tamil: அஆஇஈஉஊஎஏஐஒஓஔகஙசஞடணதநனபமயரலவழளஷஸஹ',
'Japanese: あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん',
'Chinese: 你好 世界',
'Korean: 안녕하세요 세계',
'Thai: สวัสดีชาวโลก', // Thai does not seem to work even with /p{L} and required additional range
'Vietnamese: ăâắáấàằầảẳẩãẵẫạặậđêéếèềẻểẽễẹệíìỉĩịôơóốớòồờỏổởõỗỡọộợưúứùừủửũữụựýỳỷỹỵ',
'Singapore: 你好 世界',
],
invalid: [
' BMW',
Expand Down
2 changes: 1 addition & 1 deletion src/types/Patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const Patterns = {
UUID: /^[a-f0-9]{8}(-[a-f0-9]{4}){4}[a-f0-9]{8}$/i,
EXTID: /^[a-z0-9]{6,36}$/i,
COMPANY_NAME:
/^(?!.*\s$)([\wÀ-ÿ£$¥¢@%*+\-/\\,.:;=<>!?&^#'\x22()[\]]\s?){1,160}$/,
/^(?!.*\s$)([\p{L}\u0E00-\u0E7F\d\p{Sc}@%*+_\-/\\,.:;=<>!?&^#'\x22()[\]]\s?){1,160}$/u,
personName: personNamePattern,
name: /^([A-Za-z\u00C0-\u017F-,.'](?!.*[-,.]{2})[A-Za-z\u00C0-\u017F-,.']{0,40} ?)[^ ]{1,40}$/,
zipcode: /^[A-Z0-9-]{1,8}$/,
Expand Down

0 comments on commit c10e8da

Please sign in to comment.