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

Vaildation error is not shown on collapsed objects #5630

Open
martinjagodic opened this issue Jul 19, 2021 · 3 comments
Open

Vaildation error is not shown on collapsed objects #5630

martinjagodic opened this issue Jul 19, 2021 · 3 comments
Assignees
Labels
area: extensions/widgets good first issue type: bug

Comments

@martinjagodic
Copy link
Contributor

@martinjagodic martinjagodic commented Jul 19, 2021

Describe the bug
If a field inside a collapsed object fires a validation error, the entry will not be saved. This is the correct behavior, but the problem is, that there is no indication of where the error occurs.

To Reproduce
Steps to reproduce the behavior. For example:

  1. Create an object field and add collapsed: true
  2. Add a required sub-field
  3. Leave the sub-field empty and try to save the entry.
  4. See a general error notification at the top and observe that there is no notification on the collapsed object

Expected behavior
If a field is collapsed and it includes objects with validation errors, it should also be treated as a field with an error. It should get a red border and an explanation text in red color.

Screenshots
Collapsed - there is no indication that a required filed is empty in services object
Screenshot 2021-07-19 at 11 12 35

Uncollapsed
Screenshot 2021-07-19 at 11 12 46

Applicable Versions:

  • Netlify CMS version: 2.10.147
  • Git provider: GitHub
  • OS: MacOS 11.4 (20F71)
  • Browser version: Brave 1.26

CMS configuration
Example configuration for a collapsed object with a required string field. This happens on any global configuration I believe.

{name: services, widget: object, collapsed: true, summary: fields: [
  {name: title, widget: string}
]}
@martinjagodic martinjagodic added the type: bug label Jul 19, 2021
@evelew
Copy link

@evelew evelew commented Oct 4, 2021

Hi, can I fix this one?

@erezrokah
Copy link
Collaborator

@erezrokah erezrokah commented Oct 5, 2021

Thanks @evelew, a possible place to start is here

Also see our contribution guide https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md

@evelew
Copy link

@evelew evelew commented Oct 5, 2021

@erezrokah ok, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: extensions/widgets good first issue type: bug
Projects
None yet
Development

No branches or pull requests

3 participants