/** * Input Validators * Validation functions for interactive prompts */ /** * Validate non-empty string (allows undefined for prompts with default values) */ export function validateRequired(fieldName: string) { return (value: string | undefined): string | Error | undefined => { // Allow undefined (default will be used) if (value === undefined) { return; } if (!value.trim()) { return `${fieldName} is required`; } }; }