Skip to content

Document using with pre-existing class-validator decorated classes #2

Description

@boenrobot

It seems like I could have a model decorated with the original class-validator decorators, but this isn't quite obvious... I mean, importing them from this package instead of from class-validator makes it seem like this package is doing some modifications to them.

Does the model have to inherit from FormikValidatorBase, or is there a way to pass an arbitrary class to a function to transform it for formik?

On a related note, I'm not sure if/how field level validation would work with this, especially if the original class-validator decorators are used...

The reason I'm bringing this at all is that I want to define my validation rules once, and use them on both client and server, not write them with "class-validator" for the server, and with this for the client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions