class-validator
class-validator copied to clipboard
feat: new Validation decorators IsNatural and IsNaturalNoZero
Hi i add two new functionality to decorators called IsNatural and IsNaturalNoZero.
here is simple definition for them
IsNatural if field contains anything other than a natural number: 0, 1, 2, 3, etc.
iSNaturalNoZero if field contains anything other than a natural number, except zero: 1, 2, 3, etc.
Why when you can just combine @IsInt and @IsPositive?