class-validator icon indicating copy to clipboard operation
class-validator copied to clipboard

I want to customize the return type

Open SenvenQi opened this issue 8 years ago • 6 comments

I want to customize the return type, but you don't have such a configuration, and I want to do a better way to return to the custom type.

SenvenQi avatar Dec 23 '17 18:12 SenvenQi

Can you elaborate more?

NoNameProvided avatar Dec 24 '17 00:12 NoNameProvided

Because I'm using react, I want setState (error), but I didn't think of a better way to get this error message to change state.Because the return type must be ValidationError.I don't have a better way to do it。

SenvenQi avatar Dec 24 '17 04:12 SenvenQi

@SenvenQi Look here, I've attached an example of my decision https://github.com/typestack/class-validator/issues/132

kalyuk avatar Dec 25 '17 11:12 kalyuk

@kalyuk thank you.

SenvenQi avatar Dec 26 '17 01:12 SenvenQi

@SenvenQi Did @kalyuk solution solve your problem? Can we close this?

NoNameProvided avatar Dec 28 '17 13:12 NoNameProvided

yes

SenvenQi avatar Dec 29 '17 11:12 SenvenQi