Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class-validator not support ValidateNested #40

Open
a4712020502 opened this issue Jun 14, 2022 · 1 comment
Open

class-validator not support ValidateNested #40

a4712020502 opened this issue Jun 14, 2022 · 1 comment

Comments

@a4712020502
Copy link

a4712020502 commented Jun 14, 2022

export default class FileParam {
  @ValidateNested()
  metadata: FileMetadataParam;
}

export class FileMetadataParam {
  @IsPositive()
  public size: number;
}


   // controller
  @Post("")
  async upload(@Body() fileParam: FileParam, @Ctx() ctx: Context) {
      // todo
  }
@iyobo
Copy link
Owner

iyobo commented Oct 17, 2023

Just curious, are you using esbuild?
esbuild does not fully support decorators, especially argument decorators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants