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