Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27902

mongoDB Validations: How to apply mongoDB validation for Multiple elements of json of Array.

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None

      Hi Team,

      I might have posted the question with incorrect components or may be project. But the question is regarding validation feature in mongoDB. Please help me on it.

      Question:
      If I enable mongoDB validation using mongoShell for json of array element then the validation works only if I pass one element as json in the array. However if I pass multiple elements in array for insert/update then validation do not work properly, In this case invalid data is also allowed.

      I have done rigorous search about it and could not find anything helpful.

      Please let me know how to apply validation for multiple elements for array of json for insert/update. Validation is a great feature in mongoDB and I would like to keep it using.

      Thanks.

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            monika123 monika
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: