Skip to content

Let's use Joi more #42

@ericeslinger

Description

@ericeslinger

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions