@cobre-npm/library-onboarding-core 0.7.5 → 0.7.7
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:
|
|
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: 0, max: 100, exclusiveMin: true }, 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,7 +2420,10 @@ export declare const locales: {
|
|
|
2420
2420
|
nameFormat: string;
|
|
2421
2421
|
nameMinLength: string;
|
|
2422
2422
|
numericOnly: string;
|
|
2423
|
+
decimalSeparator: string;
|
|
2424
|
+
integerOnly: string;
|
|
2423
2425
|
numericRange: string;
|
|
2426
|
+
numericRangeExclusiveMin: string;
|
|
2424
2427
|
alphanumericOnly: string;
|
|
2425
2428
|
minLength: string;
|
|
2426
2429
|
maxLength: string;
|
|
@@ -2500,7 +2503,10 @@ export declare const locales: {
|
|
|
2500
2503
|
nameFormat: string;
|
|
2501
2504
|
nameMinLength: string;
|
|
2502
2505
|
numericOnly: string;
|
|
2506
|
+
decimalSeparator: string;
|
|
2507
|
+
integerOnly: string;
|
|
2503
2508
|
numericRange: string;
|
|
2509
|
+
numericRangeExclusiveMin: string;
|
|
2504
2510
|
alphanumericOnly: string;
|
|
2505
2511
|
minLength: string;
|
|
2506
2512
|
maxLength: string;
|
|
@@ -69,7 +69,10 @@
|
|
|
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
|
+
"decimalSeparator": "Use a period as the decimal separator (for example, 33.33)",
|
|
73
|
+
"integerOnly": "Enter a whole number, no decimals",
|
|
72
74
|
"numericRange": "Enter a value between {min} and {max}",
|
|
75
|
+
"numericRangeExclusiveMin": "Enter a value greater than {min} and up to {max}",
|
|
73
76
|
"alphanumericOnly": "Use letters and numbers only",
|
|
74
77
|
"minLength": "Must be at least {min} characters",
|
|
75
78
|
"maxLength": "Cannot exceed {max} characters",
|
|
@@ -69,7 +69,10 @@
|
|
|
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
|
+
"decimalSeparator": "Usa el punto como separador decimal (por ejemplo, 33.33)",
|
|
73
|
+
"integerOnly": "Ingresa un número entero, sin decimales",
|
|
72
74
|
"numericRange": "Ingresa un valor entre {min} y {max}",
|
|
75
|
+
"numericRangeExclusiveMin": "Ingresa un valor mayor a {min} y hasta {max}",
|
|
73
76
|
"alphanumericOnly": "Usa solo letras y números",
|
|
74
77
|
"minLength": "Debe tener al menos {min} caracteres",
|
|
75
78
|
"maxLength": "No puede tener más de {max} caracteres",
|