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

Remove novalidate attribute from comment form to enable client-side validation #717

Conversation

rutviksavsani
Copy link
Contributor

Fixes: #364
This PR adds an action to remove the novalidate attribute which is added by WordPress core in the comments form. Removing that attribute will enable client-side validation too for comment form which may not allow invalid data to be submitted.

Screenshot

image

@google-cla
Copy link

google-cla bot commented Mar 1, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@thelovekesh thelovekesh requested a review from westonruter March 1, 2022 06:48
@codecov-commenter
Copy link

Codecov Report

Merging #717 (2ebebc5) into develop (9935ff9) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #717      +/-   ##
=============================================
- Coverage      19.96%   19.93%   -0.03%     
  Complexity       326      326              
=============================================
  Files             56       56              
  Lines           2094     2097       +3     
=============================================
  Hits             418      418              
- Misses          1676     1679       +3     
Flag Coverage Δ
php 19.93% <0.00%> (-0.03%) ⬇️
unit 19.93% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pwa.php 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9935ff9...2ebebc5. Read the comment docs.

@westonruter
Copy link
Collaborator

If offline commenting is removed as suggested in #363 (comment), then this wouldn't be strictly necessary. I'm not totally settled on the direction of that, but I'm leaning towards removal of the feature.

@rutviksavsani
Copy link
Contributor Author

If offline commenting is removed as suggested in #363 (comment), then this wouldn't be strictly necessary. I'm not totally settled on the direction of that, but I'm leaning towards removal of the feature.

Yes, I also agree with your point for the removal of offline commenting, but until it is completely removed we can add this feature and also remove it along with the offline commenting feature.
We will be deprecating the offline commenting feature at first, hence we can add this as a supporting feature until then.

@westonruter
Copy link
Collaborator

We will be deprecating the offline commenting feature at first, hence we can add this as a supporting feature until then.

That's the thing. I think we may just remove it entirely because (1) it's broken when a user tries to comment while logged-in and their nonce expires, and (2) I don't believe anyone is using it (at least I've never heard of someone talking about this feature).

@thelovekesh
Copy link
Collaborator

@westonruter Since we are removing the offline-commenting feature in #728, should we close this PR?

@westonruter
Copy link
Collaborator

Yes, thanks.

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.

Offline commenting can fail if the user does not provide valid fields
4 participants