- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
Major - P3
 - 
    Affects Version/s: 5.0.2, 5.0.3
 - 
    Component/s: None
 
- 
        Fully Compatible
 - 
        ALL
 - 
        
 - 
        Execution Team 2022-04-04
 - 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
If I create a collection with validationLevel: strict and validationAction: warn, and subsequently run db.collection.validate() on a collection containing invalid documents, I would expect the number of invalid documents and the warnings array to be populated
However, running `db.collection.validate()` on a collection with invalid documents returns unexpected results:
- nInvalidDocuments is 0
 - and no messages present in the warnings[] or errors[] array
 
The logs for the server do log the errors, but the errors are not reflected in the output to db.collection.validate().
If I use validationAction: error, then execute `db.collection.validate()`, there is a warning present in warnings[] but nInvalidDocuments is still 0.
- is related to
 - 
                    
SERVER-65078 'validate' to report non-compliant documents as errors when the validation level is 'error' in testing
-         
 - Closed
 
 -         
 
- related to
 - 
                    
SERVER-53635 Add document schema validation to validate() command
-         
 - Closed
 
 -