-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Milestone
Description
Model.$schema uses strings to name types. Let's make them Joi validators instead. Joi has a robust DSL for expressing type contracts that is available at run-time. We could put a hook on Model to test itself at instantiation and throw errors if there are mismatches (say) between an attribute's type and its default type. Plus, this makes it easier to build object validators (for extended fields).