@remoteoss/json-schema-form 0.1.1-dev.20230616112349 → 0.1.1-dev.20230619163824

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.
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2023 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.1.1-dev.20230616112349
5
- Generated: Fri, 16 Jun 2023 11:24:06 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.1.1-dev.20230619163824
5
+ Generated: Mon, 19 Jun 2023 16:38:39 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -371,7 +371,16 @@ var baseString = (0, import_yup.string)().trim();
371
371
  var todayDateHint = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
372
372
  var convertBytesToKB = convertDiskSizeFromTo("Bytes", "KB");
373
373
  var convertKbBytesToMB = convertDiskSizeFromTo("KB", "MB");
374
- var validateOnlyStrings = (0, import_yup.string)().trim().nullable().test("is-string", (value, context) => typeof context.originalValue === "string");
374
+ var validateOnlyStrings = (0, import_yup.string)().trim().nullable().test(
375
+ "is-string",
376
+ "${path} must be a `string` type, but the final value was: `${value}`.",
377
+ (value, context) => {
378
+ if (context.originalValue) {
379
+ return typeof context.originalValue === "string";
380
+ }
381
+ return true;
382
+ }
383
+ );
375
384
  var yupSchemas = {
376
385
  text: validateOnlyStrings,
377
386
  select: (0, import_yup.string)().trim().nullable(),
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2023 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.1.1-dev.20230616112349
5
- Generated: Fri, 16 Jun 2023 11:24:06 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.1.1-dev.20230619163824
5
+ Generated: Mon, 19 Jun 2023 16:38:39 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -335,7 +335,16 @@ var baseString = string().trim();
335
335
  var todayDateHint = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
336
336
  var convertBytesToKB = convertDiskSizeFromTo("Bytes", "KB");
337
337
  var convertKbBytesToMB = convertDiskSizeFromTo("KB", "MB");
338
- var validateOnlyStrings = string().trim().nullable().test("is-string", (value, context) => typeof context.originalValue === "string");
338
+ var validateOnlyStrings = string().trim().nullable().test(
339
+ "is-string",
340
+ "${path} must be a `string` type, but the final value was: `${value}`.",
341
+ (value, context) => {
342
+ if (context.originalValue) {
343
+ return typeof context.originalValue === "string";
344
+ }
345
+ return true;
346
+ }
347
+ );
339
348
  var yupSchemas = {
340
349
  text: validateOnlyStrings,
341
350
  select: string().trim().nullable(),