@dnax/core 0.1.13 → 0.1.14

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.
@@ -82,6 +82,12 @@ class useRest {
82
82
  let valid = true;
83
83
  let output = { ...data };
84
84
  let errorMxg;
85
+ let control = {
86
+ error: null,
87
+ value: null,
88
+ waring: null
89
+ }
90
+
85
91
  /* let issue = err?.issues[0] || {};
86
92
  let msg = `Field : ${issue?.path[0]?.key} - ${issue?.message}`;
87
93
  */
@@ -96,12 +102,12 @@ class useRest {
96
102
  return sc.optional();
97
103
  }
98
104
  );
99
- const { error, value } = partialSchema.validate(data);
105
+ control = partialSchema.validate(data) as any;
100
106
  } else {
101
- const { error, value } = schema.validate(data);
107
+ control = schema.validate(data) as any;
102
108
  }
103
109
 
104
- const { error, value } = schema.validate(data);
110
+ const { error, value } = control;
105
111
 
106
112
  if (error) {
107
113
  valid = false;
@@ -112,7 +118,6 @@ class useRest {
112
118
  ...data,
113
119
  ...output,
114
120
  };
115
-
116
121
  //console.log(value);
117
122
  }
118
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "devDependencies": {