@sanity/schema 5.14.0-next.44 → 5.14.0-next.45

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/lib/_internal.js CHANGED
@@ -1822,6 +1822,14 @@ function validateField(field, visitorContext) {
1822
1822
  `The type "${field.type}" is a document type and should not be used as a field type directly. Use a "reference" if you want to create a link to the document, or use "object" if you want to embed fields inline.`,
1823
1823
  HELP_IDS.FIELD_TYPE_IS_DOCUMENT
1824
1824
  )
1825
+ ), field.title && typeof field.title != "string" && problems.push(
1826
+ warning(
1827
+ `Field "${field.name}" has a non-string title. This is known to cause problems and will not be supported in future versions. Please use a string instead.`
1828
+ )
1829
+ ), field.description && typeof field.description != "string" && problems.push(
1830
+ warning(
1831
+ `Field "${field.name}" has a non-string description. This is known to cause problems and will not be supported in future versions. Please use a string instead.`
1832
+ )
1825
1833
  ), problems;
1826
1834
  }
1827
1835
  function getDuplicateFields(array2) {