@sanity/validation 2.21.8-reference-updates.21 → 2.21.8-reference-updates.30

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 +1 @@
1
- {"version":3,"file":"objectValidator.d.ts","sourceRoot":"","sources":["../../../src/validators/objectValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAc,MAAM,eAAe,CAAA;AAKrD,QAAA,MAAM,gBAAgB,EAAE,UAkEvB,CAAA;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"objectValidator.d.ts","sourceRoot":"","sources":["../../../src/validators/objectValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAc,MAAM,eAAe,CAAA;AAKrD,QAAA,MAAM,gBAAgB,EAAE,UAiEvB,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -64,10 +64,10 @@ var objectValidators = _objectSpread(_objectSpread({}, _genericValidator.default
64
64
 
65
65
  var exists = yield getDocumentExists({
66
66
  id: value._ref
67
- }); // TODO: this error message copy may need improvement
67
+ });
68
68
 
69
69
  if (!exists) {
70
- return 'The referenced document is not yet published. Fix this error by opening the referenced document and publishing it';
70
+ return 'This reference must be published';
71
71
  }
72
72
 
73
73
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/validation",
3
- "version": "2.21.8-reference-updates.21+76b1a1bcf7",
3
+ "version": "2.21.8-reference-updates.30+67904fd15f",
4
4
  "description": "Validation and warning infrastructure for Sanity projects",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./dist/dts",
@@ -32,8 +32,8 @@
32
32
  "directory": "packages/@sanity/validation"
33
33
  },
34
34
  "devDependencies": {
35
- "@sanity/client": "2.21.8-reference-updates.21+76b1a1bcf7",
36
- "@sanity/schema": "2.21.8-reference-updates.21+76b1a1bcf7"
35
+ "@sanity/client": "2.21.8-reference-updates.30+67904fd15f",
36
+ "@sanity/schema": "2.21.8-reference-updates.30+67904fd15f"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@sanity/client": "^2.0.0"
@@ -44,9 +44,9 @@
44
44
  }
45
45
  },
46
46
  "dependencies": {
47
- "@sanity/types": "2.21.8-reference-updates.21+76b1a1bcf7",
47
+ "@sanity/types": "2.21.8-reference-updates.30+67904fd15f",
48
48
  "date-fns": "^2.16.1",
49
49
  "lodash": "^4.17.15"
50
50
  },
51
- "gitHead": "76b1a1bcf77ac4684d042147b5d41de20a6a3ff7"
51
+ "gitHead": "67904fd15fcaf04aaaecf0bb2039bdac61f5d5bd"
52
52
  }
@@ -44,9 +44,8 @@ const objectValidators: Validators = {
44
44
  }
45
45
 
46
46
  const exists = await getDocumentExists({id: value._ref})
47
- // TODO: this error message copy may need improvement
48
47
  if (!exists) {
49
- return 'The referenced document is not yet published. Fix this error by opening the referenced document and publishing it'
48
+ return 'This reference must be published'
50
49
  }
51
50
 
52
51
  return true