longshotlabs / simpl-schema

A JavaScript schema validation package that supports direct validation of MongoDB update modifier objects
https://www.npmjs.com/package/simpl-schema
MIT License
560 stars 115 forks source link

Blackbox for custom type #265

Open SachaG opened 6 years ago

SachaG commented 6 years ago

I know I can have blackbox fields by writing blackbox: true. My question is, how can I achieve the same thing but with a custom type instead, i.e. by writing type: MyCustomType? How should I write this custom type?

chrisbobbe commented 6 years ago

Does the section on Subschemas in the docs answer your question? https://github.com/aldeed/simple-schema-js#subschemas

SachaG commented 6 years ago

Not really, no.