@swan-io/shared-business 13.2.0 → 13.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-io/shared-business",
3
- "version": "13.2.0",
3
+ "version": "13.2.1",
4
4
  "engines": {
5
5
  "node": "^22.12.0"
6
6
  },
@@ -25,7 +25,7 @@
25
25
  ],
26
26
  "license": "MIT",
27
27
  "peerDependencies": {
28
- "@swan-io/lake": "13.2.0"
28
+ "@swan-io/lake": "13.2.1"
29
29
  },
30
30
  "dependencies": {
31
31
  "@formatjs/intl": "^3.1.6",
@@ -50,6 +50,6 @@
50
50
  "@types/react-dom": "^19.1.7",
51
51
  "@types/react-native": "^0.72.8",
52
52
  "type-fest": "^4.41.0",
53
- "@swan-io/lake": "13.2.0"
53
+ "@swan-io/lake": "13.2.1"
54
54
  }
55
55
  }
@@ -21,7 +21,7 @@ export const getCompanyTaxNumberHelp = (country) => match(country)
21
21
  .with("FIN", () => t("common.form.help.nbCharacters", { nbCharacters: "8-9" }))
22
22
  .with("FRA", () => t("common.form.help.nbDigits", { nbDigits: "9" }))
23
23
  .with("ESP", () => t("common.form.help.nbCharacters", { nbCharacters: "9" }))
24
- .with("ITA", () => t("common.form.help.nbCharacters", { nbCharacters: "11" }))
24
+ .with("ITA", () => t("common.form.help.nbDigits", { nbDigits: "11" }))
25
25
  .with("NLD", () => t("common.form.help.nbDigits", { nbDigits: "9" }))
26
26
  .with("PRT", () => t("common.form.help.nbDigits", { nbDigits: "9" }))
27
27
  .otherwise(() => "");
@@ -146,8 +146,8 @@ export const validateCompanyTaxNumber = (country) => value => {
146
146
  }
147
147
  })
148
148
  .with("ITA", () => {
149
- // accept 11 characters
150
- if (!/^[a-zA-Z0-9]{11}$/.test(value)) {
149
+ // accept 11 digits
150
+ if (!/^\d{11}$/.test(value)) {
151
151
  return t("common.form.invalidTaxIdentificationNumber");
152
152
  }
153
153
  })