@cobre-npm/library-onboarding-core 0.7.5 → 0.7.6
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.
|
@@ -26,9 +26,9 @@ exports.FIELD_VALIDATIONS = {
|
|
|
26
26
|
incorporation_date: { rule: { kind: "pastDate" } },
|
|
27
27
|
operations_start_date: { rule: { kind: "pastDate" } },
|
|
28
28
|
birth_date: { rule: { kind: "pastDate", minAgeYears: 18 } },
|
|
29
|
-
// Percentage KYC data points.
|
|
30
|
-
percentage_ownership: { rule: { kind: "numericRange", min: 1, max: 100 } },
|
|
31
|
-
cash_transaction_percentage: { rule: { kind: "numericRange", min: 0, max: 100 } },
|
|
29
|
+
// Percentage KYC data points — a space is never part of a number.
|
|
30
|
+
percentage_ownership: { rule: { kind: "numericRange", min: 1, max: 100 }, noSpaces: true },
|
|
31
|
+
cash_transaction_percentage: { rule: { kind: "numericRange", min: 0, max: 100 }, noSpaces: true },
|
|
32
32
|
// Identifiers/codes — length + no-spaces (whitespace is never part of the value).
|
|
33
33
|
tax_id_number: { maxLength: 50, noSpaces: true },
|
|
34
34
|
e_sign_number: { maxLength: 50, noSpaces: true },
|
|
@@ -38,14 +38,19 @@ exports.FIELD_VALIDATIONS = {
|
|
|
38
38
|
number: { maxLength: 50, noSpaces: true },
|
|
39
39
|
third_party_id: { maxLength: 100, noSpaces: true },
|
|
40
40
|
email: { noSpaces: true },
|
|
41
|
+
/*
|
|
42
|
+
* Not identifiers, but whitespace is never part of the value either — a phone,
|
|
43
|
+
* a URL and a count are each broken by a stray space.
|
|
44
|
+
*/
|
|
45
|
+
phone: { minLength: 2, maxLength: exports.DEFAULT_PHONE_MAX_LENGTH, noSpaces: true },
|
|
46
|
+
website: { maxLength: 500, noSpaces: true },
|
|
47
|
+
monthly_counterparties_count: { maxLength: 100, noSpaces: true },
|
|
41
48
|
// Length-only fields.
|
|
42
|
-
phone: { minLength: 2, maxLength: exports.DEFAULT_PHONE_MAX_LENGTH },
|
|
43
49
|
legal_name: { maxLength: 300 },
|
|
44
50
|
dba_name: { maxLength: 300 },
|
|
45
51
|
incorporation_state: { maxLength: 100 },
|
|
46
52
|
incorporation_city: { maxLength: 100 },
|
|
47
53
|
business_description: { maxLength: 2000 },
|
|
48
|
-
website: { maxLength: 500 },
|
|
49
54
|
line_1: { maxLength: 200 },
|
|
50
55
|
line_2: { maxLength: 200 },
|
|
51
56
|
city: { maxLength: 100 },
|
|
@@ -62,7 +67,6 @@ exports.FIELD_VALIDATIONS = {
|
|
|
62
67
|
public_office_position: { maxLength: 500 },
|
|
63
68
|
legal_proceedings_description: { maxLength: 5000 },
|
|
64
69
|
funds_source_other_description: { maxLength: 1000 },
|
|
65
|
-
monthly_counterparties_count: { maxLength: 100 },
|
|
66
70
|
};
|
|
67
71
|
const getFieldValidation = (fieldName) => exports.FIELD_VALIDATIONS[fieldName];
|
|
68
72
|
exports.getFieldValidation = getFieldValidation;
|
package/dist/index.d.ts
CHANGED
|
@@ -2420,6 +2420,7 @@ export declare const locales: {
|
|
|
2420
2420
|
nameFormat: string;
|
|
2421
2421
|
nameMinLength: string;
|
|
2422
2422
|
numericOnly: string;
|
|
2423
|
+
integerOnly: string;
|
|
2423
2424
|
numericRange: string;
|
|
2424
2425
|
alphanumericOnly: string;
|
|
2425
2426
|
minLength: string;
|
|
@@ -2500,6 +2501,7 @@ export declare const locales: {
|
|
|
2500
2501
|
nameFormat: string;
|
|
2501
2502
|
nameMinLength: string;
|
|
2502
2503
|
numericOnly: string;
|
|
2504
|
+
integerOnly: string;
|
|
2503
2505
|
numericRange: string;
|
|
2504
2506
|
alphanumericOnly: string;
|
|
2505
2507
|
minLength: string;
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"nameFormat": "Use only letters, spaces, apostrophes and hyphens",
|
|
70
70
|
"nameMinLength": "Name must be at least {min} characters",
|
|
71
71
|
"numericOnly": "Use digits only, no letters or symbols",
|
|
72
|
+
"integerOnly": "Enter a whole number, no decimals",
|
|
72
73
|
"numericRange": "Enter a value between {min} and {max}",
|
|
73
74
|
"alphanumericOnly": "Use letters and numbers only",
|
|
74
75
|
"minLength": "Must be at least {min} characters",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"nameFormat": "Usa solo letras, espacios, apóstrofes y guiones",
|
|
70
70
|
"nameMinLength": "El nombre debe tener al menos {min} caracteres",
|
|
71
71
|
"numericOnly": "Usa solo números, sin letras ni símbolos",
|
|
72
|
+
"integerOnly": "Ingresa un número entero, sin decimales",
|
|
72
73
|
"numericRange": "Ingresa un valor entre {min} y {max}",
|
|
73
74
|
"alphanumericOnly": "Usa solo letras y números",
|
|
74
75
|
"minLength": "Debe tener al menos {min} caracteres",
|