Skip to content

fix(ui): slugField validation error hiding Unlock / Lock button (#14827)#15885

Open
noahbachmann wants to merge 3 commits intopayloadcms:mainfrom
noahbachmann:fix/slug-validation-tooltip
Open

fix(ui): slugField validation error hiding Unlock / Lock button (#14827)#15885
noahbachmann wants to merge 3 commits intopayloadcms:mainfrom
noahbachmann:fix/slug-validation-tooltip

Conversation

@noahbachmann
Copy link

@noahbachmann noahbachmann commented Mar 9, 2026

Closes Issue #14827

What?

When there is a validation error with the slugField (e.g. empty field), the FieldError renders above the "Unlock"-Button. The user can't interact with this button and they are locked out of unlocking the slugField-input.
before

How?

Tooltip already has a property to change its position (position?: 'bottom' | 'top'). I added this nullable prop to FieldError / GenericErrorProps (readonly position?: 'bottom' | 'top').
Then i used the TextInput.props.Error inside fields/Slug by creating a FieldError with props.position = "bottom" (before this, it used the fallback FieldError inside TextInput).
after

Overlap issue

You can see there is still an issue with the Tooltip overlapping. So i fixed the styling in the Tooltip/index.scss:
after-style

@noahbachmann noahbachmann marked this pull request as draft March 9, 2026 13:33
@noahbachmann noahbachmann changed the title fix(ui): SlugField validation error hiding Unlock / Lock button ([#14827](https://github.com/payloadcms/payload/issues/14827)) fix(ui): slugField validation error hiding Unlock / Lock button (#14827) Mar 9, 2026
@noahbachmann noahbachmann marked this pull request as ready for review March 9, 2026 13:34
@noahbachmann noahbachmann marked this pull request as draft March 9, 2026 13:44
@noahbachmann noahbachmann marked this pull request as ready for review March 9, 2026 13:50
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