Class-validator: Proposal: @IsArray validator

Created on 22 Sep 2016  路  2Comments  路  Source: typestack/class-validator

It would be nice if you add @IsArray validator.

For example i have following code:

@IsString({
    each: true
})
public readonly reservedNames: string[];

with this rule validator will not throw an error with string value assigned to the reservedNames property.

@IsArray validator should check only for array type, no matter - empty array or not.

Most helpful comment

added in 0.6.1

All 2 comments

yes strange that we still don't have it

added in 0.6.1

Was this page helpful?
0 / 5 - 0 ratings