Quantcast
Channel: User user2297996 - Stack Overflow
Viewing all articles
Browse latest Browse all 39

How to make class-validator to stop on error?

$
0
0

I want class validator to stop validation as soon as the first error is found.

I know there is a stopAtFirstError option, but that prevents further validation on property level only. I want to stop it globally:

@IsString() // Let's say this received invalid valuesomeStr: string@IsInt() // I want this to be NOT executedsomeNuber: number

Is this possible?


Viewing all articles
Browse latest Browse all 39

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>