Skip to content
On this page

ValidationPipe

参数接收

nest 会自动转换 body 的字段类型适配我们的 dto 对象

参数验证

局部注册

全局注册 1

全局注册 2(这种 pipe 里面就不能注入其他 provider 了)