/**
 * User Input Validation
 *
 * Validates request bodies for the /api/users endpoint.
 * Provides field-level validation with structured error responses.
 *
 * @module controllers/user/user-validation
 */
/**
 * Structured validation error
 */
export interface ValidationError {
    /** Error message */
    error: string;
    /** Field that failed validation */
    field?: string;
}
/**
 * Validation result — either valid with cleaned data, or invalid with error
 */
export type ValidationResult<T> = {
    valid: true;
    data: T;
} | {
    valid: false;
    error: ValidationError;
};
/**
 * Validated user creation input
 */
export interface ValidatedUserInput {
    username: string;
    email: string;
    password: string;
}
/**
 * Validate the username field.
 *
 * Rules:
 * - Required, non-empty
 * - Must be a string
 * - Alphanumeric, underscores, hyphens only
 * - Length between 3 and 32 characters
 * - Trimmed of whitespace
 *
 * @param value - Raw username value
 * @returns Validation result with trimmed username or error
 */
export declare function validateUsername(value: unknown): ValidationResult<string>;
/**
 * Validate the email field.
 *
 * Rules:
 * - Required, non-empty
 * - Must be a string
 * - Must contain @ and match email format
 * - Trimmed and lowercased
 *
 * @param value - Raw email value
 * @returns Validation result with normalized email or error
 */
export declare function validateEmail(value: unknown): ValidationResult<string>;
/**
 * Validate the password field.
 *
 * Rules:
 * - Required, non-empty
 * - Must be a string
 * - Minimum 8 characters
 * - Not trimmed (spaces in passwords are intentional)
 *
 * @param value - Raw password value
 * @returns Validation result with password or error
 */
export declare function validatePassword(value: unknown): ValidationResult<string>;
/**
 * Validate a complete user creation request body.
 *
 * Validates all three required fields (username, email, password) and
 * returns the first error encountered, or cleaned data on success.
 *
 * @param body - Raw request body
 * @returns Validation result with all validated fields or first error
 */
export declare function validateCreateUserInput(body: unknown): ValidationResult<ValidatedUserInput>;
//# sourceMappingURL=user-validation.d.ts.map