Skip to content

fix(FormField): hide error if error prop is false - #5599

Merged
benjamincanac merged 2 commits into
nuxt:v4from
J-Michalek:fix/form-field-error
Dec 4, 2025
Merged

benjamincanac merged 2 commits into
nuxt:v4from
J-Michalek:fix/form-field-error

Conversation

@J-Michalek

Copy link
Copy Markdown
Contributor

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

While the error prop is set to false the error message should not appear.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@github-actions github-actions Bot added the v4 #4488 label Dec 4, 2025
Comment thread src/runtime/components/FormField.vue Outdated
import type { FormError, FormFieldInjectedOptions } from '../types/form'

const props = defineProps<FormFieldProps>()
const props = withDefaults(defineProps<FormFieldProps>(), { error: undefined })

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary to set the default due to boolean casting.

@pkg-pr-new

pkg-pr-new Bot commented Dec 4, 2025 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/ui@5599

commit: 36de12d

@benjamincanac
benjamincanac merged commit 6b7fe25 into nuxt:v4 Dec 4, 2025
@J-Michalek
J-Michalek deleted the fix/form-field-error branch August 17, 2026 07:14

This branch was successfully deployed

1 active deployment
Preview – ui — 36de12d8 Deployed Dec 4, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants