-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: UI / UX
-
Labels:None
I created doc validation rules using type names (see attached) but Compass then converts them to the numeric equivalent in the JSON output and the rule that's added to MongoDB. It would be simpler for people to understand the rules if Compass kept the name instead.
rules.js
{ "name": { "$type": 3 }, "name.first": { "$type": 2 }, "name.last": { "$type": 1 }, "social.twitter": { "$type": 4 } } db.getCollectionInfos({name:"people"}) [ { "name" : "people", "type" : "collection", "options" : { "validator" : { "name" : { "$type" : 3 }, "name.first" : { "$type" : 2 }, "name.last" : { "$type" : 1 }, "social.twitter" : { "$type" : 4 } }, "validationLevel" : "strict", "validationAction" : "error" }, "info" : { "readOnly" : false }, "idIndex" : { "v" : 2, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "clusterdb.people" } } ]
Scope of the ticket:
- change type value to its string alias
- change tests to reflect this