File size: 330 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import { createZodDto } from "nestjs-zod/dto";
import { z } from "zod";

import { userSchema } from "../user";

export const registerSchema = userSchema
  .pick({ name: true, email: true, username: true, locale: true })
  .extend({ password: z.string().min(6) });

export class RegisterDto extends createZodDto(registerSchema) {}