Skip to content

Collapsible field validation error has odd error message in toast #9713

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

Closed
tyteen4a03 opened this issue Dec 3, 2024 · 2 comments
Closed

Comments

@tyteen4a03
Copy link
Contributor

tyteen4a03 commented Dec 3, 2024

Describe the Bug

I'm not sure if this is a bug or a feature request, but validation errors look weird with collapsible fields in toast:

Image

Link to the code that reproduces this issue

https://github.com/tyteen4a03/payload-beforechange-bug

Reproduction Steps

  1. Put a field inside a collapsible, and make it required.
  2. Try to save the entity without filling in the required field.

Which area(s) are affected? (Select all that apply)

area: core

Environment Info

Node.js v22.11.0

Binaries:
  Node: 22.11.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: 9.13.0
Relevant Packages:
  payload: 3.3.0
  next: 15.0.3
  @payloadcms/db-mongodb: 3.3.0
  @payloadcms/email-nodemailer: 3.3.0
  @payloadcms/graphql: 3.3.0
  @payloadcms/next/utilities: 3.3.0
  @payloadcms/payload-cloud: 3.3.0
  @payloadcms/richtext-lexical: 3.3.0
  @payloadcms/translations: 3.3.0
  @payloadcms/ui/shared: 3.3.0
  react: 19.0.0-rc-66855b96-20241106
  react-dom: 19.0.0-rc-66855b96-20241106
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
@tyteen4a03 tyteen4a03 added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels Dec 3, 2024
@github-actions github-actions bot added created-by: Contributor and removed validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels Dec 3, 2024
@tyteen4a03 tyteen4a03 changed the title Collapsible field validation error has odd error message Collapsible field validation error has odd error message in toast Dec 3, 2024
@jessrynkar
Copy link
Member

Hey @tyteen4a03 — a couple months ago we released a fix to improve the way nested field validation errors are displayed, utilizing labels where possible or subbing user-friendly strings to make them much more readable.

So the field that you provided in this issue description would now be displayed as:
Image

I recommend updating to the latest version v3.37.0 to get the improved error messages - thanks for reporting this 🙏

@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label May 8, 2025
Copy link
Contributor

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants