Open ndarilek opened 8 years ago
Yes, good idea I will add it in the next version. However there is a problem with how mongo ID is treated. In fact, it should be a MongoID object not just a string. In some cases documents may come from the other database there documents are stored with real MongoID objects. However, if think it's a very rear situation and someone may just not omit validation of such ID.
It would be nice to have a validator that checks against the format for object IDs, since it's common enough to use them in relations. Looks like this is the regexp used by simple-schema:
/^[23456789ABCDEFGHJKLMNPQRSTWXYZabcdefghijkmnopqrstuvwxyz]{17}$/
For the moment I'm instantiating my own regexp validator and reusing that.