Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emptystring #157

Merged
merged 4 commits into from
Jan 20, 2025
Merged

Emptystring #157

merged 4 commits into from
Jan 20, 2025

Conversation

spiderCSman
Copy link
Collaborator

Introduces a helper function to treat empty strings as undefined during environment variable validation. The changes aim to simplify validation logic by avoiding repetitive .min(1) calls and ensuring empty strings are correctly flagged as invalid.

Changes Made:
Added stringOrUndefined Helper:

Ensures empty strings are treated as undefined.
Applies validation using .refine() and transformation using .transform().
Updated Server and Client Environment Variables:

Replaced z.string().min(1) with stringOrUndefined for consistency and maintainability.

Copy link

vercel bot commented Jan 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hack-kit-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2025 8:14pm

@christianhelp christianhelp merged commit 45177d1 into dev Jan 20, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants