Repository navigation
Conversation
jmalnuit
requested review from
AlexisAfonso,
aottr and
sachinrameshn
and
a balanced review from Copilot
November 4, 2026 14:43
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Country-specific validation still permits a hidden account category and produces untranslated or misleading tax-identifier error messages.
3 open issues
What changed in this PR
Adds Turkish legal identifiers to the account-creation flow, using the address country and account category to control fields and validation.
Changes:
- Adds VKN, a required KDV choice with derived VAT, and optional MERSİS or DETSİS identifiers.
- Adds Turkish identifier validation, mandatory phone rules, and account-type filtering.
- Adds French labels and error messages, plus helper and account-type tests.
| File | Description |
|---|---|
packages/manager/apps/account-creation/src/pages/accountType/AccountType.spec.tsx |
Tests exclusion of unavailable account types. |
packages/manager/apps/account-creation/src/pages/accountType/AccountType.page.tsx |
Filters account-type options and tooltip content. |
packages/manager/apps/account-creation/src/pages/accountDetails/turkeyIdentifiers/TurkeyIdentifierFields.component.tsx |
Renders Turkish identifiers and the KDV choice. |
packages/manager/apps/account-creation/src/pages/accountDetails/accountDetails.page.tsx |
Integrates Turkish rules, fields, and derived VAT into the form. |
packages/manager/apps/account-creation/src/helpers/turkeyHelper.ts |
Defines Turkish eligibility, validation, and schema helpers. |
packages/manager/apps/account-creation/src/helpers/turkeyHelper.spec.ts |
Tests Turkish rules, identifiers, and schema behavior. |
packages/manager/apps/account-creation/public/translations/account-details/Messages_fr_FR.json |
Adds French labels, hints, and validation messages. |
Review effort: Balanced
| mandatory: boolean, | ||
| ) => { | ||
| const checked = z | ||
| .string() |
Comment on lines
+262
to
+263
| case TURKEY_ERRORS.pattern: | ||
| return `account_details_error_${identifier}`; |
Comment on lines
+53
to
+55
| const legalForms = useMemo( | ||
| () => selectableLegalForms(rule?.in as LegalForm[] | undefined, country), | ||
| [rule?.in, country], |
jmalnuit
force-pushed
the
feat/MANAGER-22518
branch
from
November 6, 2026 15:15
1982a69 to
593cb35
Compare
For a TR address and the Company, Non-profit or Public administration
category, the legal block starts with, in this order: the VKN, a KDV
choice ("has a KDV number, equal to the VKN" / "no KDV number", none
preselected, required), the read-only KDV when the organisation has
one, then the MERSİS No or, for a public administration, the DETSİS No.
The rules API drives these fields: each one is shown only when its rule
is returned, mandatory and formatted as the rule says, and the account
types offered are the ones the API returns. The front only adds what a
pattern cannot express: a single repeated digit or a straight run of
digits (wrapping from 9 to 0) is refused, with the reason under the
field.
The KDV is never typed: vat is the VKN, or empty for "no KDV number";
the choice itself is never sent.
Signed-off-by: jmalnuit <jonathan.malnuit@ovhcloud.com>
jmalnuit
force-pushed
the
feat/MANAGER-22518
branch
from
November 6, 2026 15:17
593cb35 to
f603e07
Compare
|
|
||
| /** The API pattern accepts the cleaned value (no pattern, or a broken one: yes). */ | ||
| const matchesRule = (digits: string, rule: Rule | undefined) => { | ||
| if (!rule?.regularExpression) return true; |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Turkish identifier validation drops API length constraints, allowing invalid VKN values into VAT, while missing required-error localization and KDV blur handling leave validation feedback incomplete.
5 open issues
Review effort: Balanced
| {' *'} | ||
| </OdsText> | ||
| </div> | ||
| <div className="w-full flex flex-col gap-2 mb-4"> |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

For a TR address and the Company, Non-profit or Public administration category, the legal block starts with, in this order: the VKN (10 digits, required), a KDV choice ("has a KDV number, equal to the VKN" / "no KDV number", none preselected, required), the read-only KDV when the organisation has one, then the MERSİS No (16 digits) or, for a public administration, the DETSİS No (8 digits), both optional.
The KDV is never typed: vat is the VKN, or empty for "no KDV number"; the choice itself is never sent. The front refuses a wrong length, a single repeated digit and a straight run of digits (wrapping from 9 to 0), with the reason under the field, on top of the API pattern. An individual sees none of these fields and the phone is mandatory.
The account type step no longer offers "Autre", nor "Entreprise individuelle" in Turkey.
Description
Ticket Reference: #...
Additional Information