function validateRegisterUserRequest
validateRegisterUserRequest(obj: unknown): string | null

Returns what is wrong with a sign-up body, as the message the register page shows, or null when it is valid. It checks the shape, the email's form, and the username and password against the VALIDATION limits. Whether the name, the email or the invite is taken is createUser's and claimInvite's check.

Parameters

obj: unknown

Return Type

string | null

Usage

import { validateRegisterUserRequest } from "api/validators/user.ts";