Opened 5 years ago
Closed 5 years ago
#47728 closed enhancement (duplicate)
Comment's form displaying validation message on the same page instead of directing user to new page & displaying errors.
Reported by: | AkSDvP | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Comments | Keywords: | |
Focuses: | Cc: |
Description
On any Page/Post, while adding a comment if in case of validation error user is redirected to new page & error messages are displayed.
Instead, it would be more user-friendly if the user is not directed to new page & error messages are displayed on the page itself, probably before form title.
Attachments (3)
Change History (9)
#1
follow-up:
↓ 6
@
5 years ago
- Keywords reporter-feedback added
Thank you for the bug report, @AkSDvP!
comment_form()
adds the required
attribute to the <input>
fields, so your browser should show a warning when they're not filled out.
Are you able to reproduce this lack of client-side warning on a site using a default theme, and no plugins?
#2
@
5 years ago
@pento Yes, I was able to reproduce the same issue by deactivating all plugins & using the twentynineteen theme.
Actually, I am testing this functionality on my local machine & it is the development environment. This issue was noticed in earlier versions as well.
For reference: I am testing it on Chrome Browser (Version 64.0.3282.140 (Official Build) (64-bit)) & Ubuntu OS.
#6
in reply to:
↑ 1
@
5 years ago
- Keywords needs-patch removed
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Hi @AkSDvP, welcome to WordPress Trac! Thanks for the ticket.
Replying to pento:
comment_form()
adds therequired
attribute to the<input>
fields, so your browser should show a warning when they're not filled out.
It does add the required
attribute, however it also has the novalidate
attribute on the form, which prevents client-side validation from being performed due to concerns about browsers implementing validation in very different ways, per discussion in #15080.
We're now re-evaluating that decision in #47595, let's continue the discussion there.
Snapshot with Error Messages displayed on other page after form data is being validated.