@tap-payments/auth-jsconnect 2.13.3-beta → 2.13.4-beta
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.
|
@@ -3,7 +3,7 @@ export declare const EntityNameValidationSchema: () => yup.ObjectSchema<import("
|
|
|
3
3
|
legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
4
|
licenseType: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
5
5
|
entityType: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
6
|
-
licenseNumber:
|
|
6
|
+
licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
7
7
|
unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
8
8
|
issuingDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
9
9
|
expiryDate: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
@@ -13,7 +13,7 @@ export declare const EntityNameValidationSchema: () => yup.ObjectSchema<import("
|
|
|
13
13
|
legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
14
14
|
licenseType: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
15
15
|
entityType: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
16
|
-
licenseNumber:
|
|
16
|
+
licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
17
17
|
unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
18
18
|
issuingDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
19
19
|
expiryDate: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
@@ -23,7 +23,7 @@ export declare const EntityNameValidationSchema: () => yup.ObjectSchema<import("
|
|
|
23
23
|
legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
24
24
|
licenseType: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
25
25
|
entityType: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
26
|
-
licenseNumber:
|
|
26
|
+
licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
27
27
|
unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
28
28
|
issuingDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
29
29
|
expiryDate: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
import { BusinessType } from '../../../../@types';
|
|
3
|
-
import { KW_MIN_LICENSE_LENGTH,
|
|
3
|
+
import { KW_MIN_LICENSE_LENGTH, UNIFIED_NUMBER_MIN_LENGTH } from '../../../../constants';
|
|
4
4
|
export var EntityNameValidationSchema = function () {
|
|
5
5
|
return yup.object().shape({
|
|
6
6
|
legalName: yup
|
|
@@ -16,22 +16,7 @@ export var EntityNameValidationSchema = function () {
|
|
|
16
16
|
}),
|
|
17
17
|
licenseType: yup.string().optional(),
|
|
18
18
|
entityType: yup.string().required('entity_type_required'),
|
|
19
|
-
licenseNumber: yup
|
|
20
|
-
.string()
|
|
21
|
-
.test({
|
|
22
|
-
test: function (value) {
|
|
23
|
-
var type = this.parent.licenseType;
|
|
24
|
-
var isCR = type === BusinessType.CR;
|
|
25
|
-
var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
26
|
-
if (length === 0)
|
|
27
|
-
return true;
|
|
28
|
-
if (isCR) {
|
|
29
|
-
return length >= CR_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_max_length' });
|
|
30
|
-
}
|
|
31
|
-
return length >= FL_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'fl_max_length' });
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
.required(''),
|
|
19
|
+
licenseNumber: yup.string().optional(),
|
|
35
20
|
unifiedNumber: yup.string().test({
|
|
36
21
|
name: 'unifiedNumber',
|
|
37
22
|
message: '',
|