Skip to main content
Represents a single username validation error returned during validation. Each error has a machine-readable code and a human-readable message.
Example
export interface UsernameValidationError {
  /**
   * A unique identifier for the validation rule that failed.
   * 
   * Example: `"username-too-short"`, `"username-invalid-characters"`
   */
  code: string;

  /**
   * A human-readable description of the error.
   * 
   * Example: `"Username must be at least 3 characters long."`
   */
  message: string;

  /**
   * The field associated with the validation error, typically "username", "email", or "phone".
   */
  field: string;
}

Properties

code
string
A unique identifier for the validation rule that failed.Example: "username-too-short", "username-invalid-characters"
field
string
The field associated with the validation error, typically “username”, “email”, or “phone”.
message
string
A human-readable description of the error.Example: "Username must be at least 3 characters long."