@zohoim/client-sdk 0.0.5-poc04 → 0.0.5-poc06
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function validateSchemaKeys(_ref) {
|
|
2
2
|
let {
|
|
3
|
-
schema,
|
|
4
|
-
data,
|
|
5
|
-
entityName
|
|
3
|
+
schema = {},
|
|
4
|
+
data = {},
|
|
5
|
+
entityName = ''
|
|
6
6
|
} = _ref;
|
|
7
7
|
Object.keys(schema).forEach(key => {
|
|
8
8
|
if (!(key in data)) {
|
|
@@ -50,8 +50,8 @@ export const validateSchema = function (schema, data) {
|
|
|
50
50
|
|
|
51
51
|
const validate = _ref4 => {
|
|
52
52
|
let {
|
|
53
|
-
schemaObj,
|
|
54
|
-
dataObj,
|
|
53
|
+
schema: schemaObj,
|
|
54
|
+
data: dataObj,
|
|
55
55
|
path = '',
|
|
56
56
|
entityName
|
|
57
57
|
} = _ref4;
|
|
@@ -85,8 +85,8 @@ export const validateSchema = function (schema, data) {
|
|
|
85
85
|
|
|
86
86
|
if (rules.type === 'object' && rules.schema) {
|
|
87
87
|
validate({
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
schema: rules.schema,
|
|
89
|
+
data: value,
|
|
90
90
|
path: fieldPath,
|
|
91
91
|
entityName
|
|
92
92
|
});
|
|
@@ -99,7 +99,6 @@ export const validateSchema = function (schema, data) {
|
|
|
99
99
|
return validate({
|
|
100
100
|
schema,
|
|
101
101
|
data,
|
|
102
|
-
path: '',
|
|
103
102
|
entityName
|
|
104
103
|
});
|
|
105
104
|
};
|