JS Validación de conjuntos


// If your field is a set and you want to perform 
// validation of each item in the set you must 
// specify a special each: true decorator option:

import { MinLength, MaxLength } from 'class-validator';

export class Post {
  @MaxLength(20, {
    each: true,
  })
  tags: Set<string>;
}
Puzzled Puffin