@opra/common 1.12.1 → 1.12.2

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.
@@ -272,7 +272,9 @@ class ComplexTypeBaseClass extends data_type_js_1.DataType {
272
272
  currentPath: currentPath + (currentPath ? '.' : '') + fieldName,
273
273
  });
274
274
  schema[fieldName] =
275
- context.partial || !field.required ? valgen_1.vg.optional(fn) : valgen_1.vg.required(fn);
275
+ context.partial || !field.required
276
+ ? valgen_1.vg.optional(fn)
277
+ : valgen_1.vg.pipe([valgen_1.vg.required(fn), valgen_1.vg.isNotEmpty()]);
276
278
  }
277
279
  if (context.allowPatchOperators) {
278
280
  schema._$pull = valgen_1.vg.optional(valgen_1.vg.isAny());
@@ -269,7 +269,9 @@ class ComplexTypeBaseClass extends DataType {
269
269
  currentPath: currentPath + (currentPath ? '.' : '') + fieldName,
270
270
  });
271
271
  schema[fieldName] =
272
- context.partial || !field.required ? vg.optional(fn) : vg.required(fn);
272
+ context.partial || !field.required
273
+ ? vg.optional(fn)
274
+ : vg.pipe([vg.required(fn), vg.isNotEmpty()]);
273
275
  }
274
276
  if (context.allowPatchOperators) {
275
277
  schema._$pull = vg.optional(vg.isAny());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/common",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "description": "Opra common package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",