Class-validator: isArray of string

Created on 27 Jul 2018  路  3Comments  路  Source: typestack/class-validator

How to validate array of strings?

@isArray(type of items)
public names: string[] = [];

Thanks!

question

Most helpful comment

Try @IsString({each: true})

All 3 comments

Try @IsString({each: true})

Looks like issue is resolved :)

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings