scottwrobinson / camo

A class-based ES6 ODM for Mongo-like databases.
556 stars 80 forks source link

Enhanced validation options #67

Open cdaringe opened 8 years ago

cdaringe commented 8 years ago

hello:

I have found that I need additional validation/constraints in my models. specifically, key:value validation on objects.

i have used other modelling libraries that have offer similar schema definition capabilities (ampersand-state, very-model, etc), but none have yet matched joi. rather than the homebrew validation in camo, how do you feel about perhaps swapping validation with an existing schema library into the ORM? less work long term, and you get the benefits of deeply tested and feature-rich schemas! just tossin' it out there

scottwrobinson commented 8 years ago

That's an interesting idea. I haven't used joi before, so I'll definitely check it out. I think its inclusion in Camo depends on its size, dependencies, etc.

Thanks for the idea!

cdaringe commented 8 years ago

yea, let me know your thoughts. i'd be happy to co-hack it out if you found it worth pursuit.