Skip to content

Returning original attributes from validator/promise #25

@pstoica

Description

@pstoica

Hey, I just started reading the docs for this and it seems like a good validation solution in node!

I haven't started using it yet, but I do have one suggestion. Using validate.async uses Promises but kind of drops composition by default by returning undefined if there are no errors. I could see it being more useful for chaining by returning the original attributes, or rejecting otherwise. The workaround would be to manually create success callbacks that return attributes, which would be redundant.

Not sure if this would be a breaking change, but maybe it can be an option in validate.async? What are your thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions