Skip to content

fix: show a single duplicate-name error during file creation - #62767

Open
mvanhorn wants to merge 1 commit into
nextcloud:masterfrom
mvanhorn:fix/62686-file-creation-duplicate-validation
Open

fix: show a single duplicate-name error during file creation#62767
mvanhorn wants to merge 1 commit into
nextcloud:masterfrom
mvanhorn:fix/62686-file-creation-duplicate-validation

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Aug 2, 2026

Copy link
Copy Markdown
  • Resolves: #

Summary

Keep validity as the single source for the inline NcTextField error and retain the input's custom validity state so form submission, including Enter-key submission, remains blocked for duplicate and otherwise invalid names. Stop proactively invoking native validity reporting when reactive validation changes, which removes the transient browser tooltip without weakening the existing constraint. Add focused component coverage around the duplicate-name state, verifying the inline error, disabled Create action, retained native invalid state, and absence of a reportValidity() call.

The web file-creation dialog currently displays the duplicate-name validation twice: once as the intended red NcTextField helper text and once as a browser-native validation tooltip. NewNodeDialog.vue creates both channels by binding validity to the field's error/helper props while also calling reportValidity() after setting a custom validity message. The issue is reproducible by entering the name of an existing file or folder in the same directory. The desired behavior is one persistent inline error with creation still blocked until the name becomes valid.

Fixes #62686

TODO

  • ...

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Screenshots before/after for front-end changes
    Not verified: this needs a person on the named hardware or environment.
  • Documentation (manuals or wiki) has been updated or is not required
  • Backports requested where applicable (ex: critical bugfixes)
  • Labels added where applicable (ex: bug/enhancement, 3. to review, feature component)
    Not run: no test command resolved in this workspace, so nothing was executed to pass.
  • Milestone added for target branch/version (ex: 32.x for stable32)
    Not run: no test command resolved in this workspace, so nothing was executed to pass.

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

AI was used for assistance.

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.

[Bug]: Two different ' this name is already in use ' message implementations in file creation on web.

1 participant