From b606888b30c431c4862c1f602498e5531fbde4d7 Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Mon, 15 Jun 2020 13:45:51 -0700 Subject: [PATCH 1/2] docs: specify the array field syntax for invalidate --- lib/document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/document.js b/lib/document.js index e48c5a2b8b2..a0b6b1284b8 100644 --- a/lib/document.js +++ b/lib/document.js @@ -2561,7 +2561,7 @@ Document.prototype.validateSync = function(pathsToValidate, options) { * value: 14 } } } * }) * - * @param {String} path the field to invalidate + * @param {String} path the field to invalidate. For array elements, use the `array.X.field` syntax, where `X` is the 0-based index in the array. * @param {String|Error} errorMsg the error which states the reason `path` was invalid * @param {Object|String|Number|any} value optional invalid value * @param {String} [kind] optional `kind` property for the error From 27ccea6f44de89e6d8809557a5a933009ebd86a7 Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Mon, 15 Jun 2020 17:05:12 -0700 Subject: [PATCH 2/2] docs: array field notation for invalidate --- lib/document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/document.js b/lib/document.js index a0b6b1284b8..3e0e42cc1ef 100644 --- a/lib/document.js +++ b/lib/document.js @@ -2561,7 +2561,7 @@ Document.prototype.validateSync = function(pathsToValidate, options) { * value: 14 } } } * }) * - * @param {String} path the field to invalidate. For array elements, use the `array.X.field` syntax, where `X` is the 0-based index in the array. + * @param {String} path the field to invalidate. For array elements, use the `array.i.field` syntax, where `i` is the 0-based index in the array. * @param {String|Error} errorMsg the error which states the reason `path` was invalid * @param {Object|String|Number|any} value optional invalid value * @param {String} [kind] optional `kind` property for the error