Skip to content

Conversation

@bankosegger
Copy link

@bankosegger bankosegger commented Dec 25, 2025

✅ Checklist


Changelog

Frontend: Disable submit button when the input field is empty to prevent validation errors

  • Added name.length === 0 check to disabled attribute in both post components (post.tsx and post-tw.tsx)

Backend: Strengthen validation to prevent empty/whitespace-only submissions

  • Added .trim() to Zod schema validation in all 6 post router variants to strip whitespace and reject empty strings
  • Ensures validation is consistent between frontend and backend

This fixes the issue where users could submit empty input to the form, resulting in backend validation errors.

💯

@changeset-bot
Copy link

changeset-bot bot commented Dec 25, 2025

🦋 Changeset detected

Latest commit: d12a8ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-t3-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
create-t3-app Ready Ready Preview, Comment Dec 25, 2025 5:22pm

@bankosegger bankosegger changed the title fix: enhance post creation validation by trimming input name fix: template, post creation validation Jan 1, 2026
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.

1 participant