Our documentation for the validate command has an inaccuracy: https://www.mongodb.com/docs/manual/reference/command/validate/#mongodb-data-validate.nIndexes
The nIndexes response parameter reads "The number of indexes on the collection." but that's not entirely correct. A more accurate description would be "The number of indexes that were validated."
This docs change will need to be backported all the way through v4.2.
If the collection portion of full validation reports errors, we return early from the command after also doing the index portion of full validation. However, since we have't yet populated the indexes map, any index information (including warnings, errors, or even simply number of indexes) will not be reported in the validate results.