问题描述:

When I have several documents where there is a field which value is selected from a small groups of choices, is there any tool that prevents from introducing a wrong value?

Thank you

Hugo

网友答案:

Depending on what exactly you're trying to accomplish, validation functions sound like what you need. All the validation functions (1 per design document, as many design documents per database as you need) are run before each write. If any validation function throws an error, the write is refused.

相关阅读:
Top