SignupDTO
Package: @nauth-toolkit/core
Type: DTO (Request)
Data transfer object for user registration with comprehensive validation and optional profile fields.
- NestJS
- Express
- Fastify
import { SignupDTO } from '@nauth-toolkit/nestjs';
import { SignupDTO } from '@nauth-toolkit/core';
import { SignupDTO } from '@nauth-toolkit/core';
Properties
| Property | Type | Required | Description |
|---|---|---|---|
email | string | Yes | User email address. Valid email format. Max 255 characters. Trimmed and lowercased. |
firstName | string | No | First name. 1-100 characters. Trimmed. |
lastName | string | No | Last name. 1-100 characters. Trimmed. |
metadata | Record<string, unknown> | No | Custom metadata fields. Validated in service layer. |
password | string | Yes | User password. 8-128 characters. Not trimmed. |
phone | string | No | Phone number. E.164 format (e.g., +14155552671). Max 20 characters. Whitespace removed. |
recaptchaToken | string | No | reCAPTCHA token from client. Required when reCAPTCHA is enforced. See reCAPTCHA Guide. |
username | string | No | Username. 3-255 characters. Alphanumeric, underscores, hyphens only. Trimmed and lowercased. |
Example
{
"email": "user@example.com",
"password": "SecurePass123!",
"username": "johndoe",
"firstName": "John",
"lastName": "Doe",
"phone": "+14155552671",
"recaptchaToken": "03AGdBq25..."
}