getgrav / getgrav/grav-plugin-admin

Enhancement request: Validation error messages

Open
#2,316 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

Currently, form validation error messages look like this:
```
Validation error:
Invalid input in "Some Field"
```
... where "Some Field" is the label for the field defined in the blueprint.
This is fine & sufficient when your admin form is short. But in complex admin forms, with tabs, lists, fieldsets, maybe nested or collapsed elements, it is hard to locate the invalid field.

I suggest to display a tree path consisting of element titles, labels or list indices, e.g.
`Invalid input in "My Tabs > Friends > [12] > Favorite Gelato Flavor"`

Contributor guide

Open the contributing guide

Research direction

Start by locating where admin form validation errors are assembled and rendered, then trace how nested tabs, lists, fieldsets, and collapsed elements are represented. The change is done when an invalid field's message includes its full element path, including titles, labels, and list indices, and the result remains readable for short forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.