#Does @Min() decorator has any advantage and ignore all others?

1 messages · Page 1 of 1 (latest)

final steppe
#

Min checks the condition of myNum should not be less than X, it's better as you can avoid writing that business logic

Same with @Max() too. cehcks for Maximum value

earnest quest
#

So those decorators just ignores all others?

#

I expect that if I send myNum: null the @Min() should not be fired at all because there are @IsOptional() and @ValidateIf decorators which assumes 'ignore all other decorators after us'.