13 | | If `novalidate` remains important to keep there is a case for optionally allowing it to be removed in order to rely only on client-side validation only. In the [https://wordpress.org/plugins/pwa/ PWA feature plugin] adds support for '''Offline Commenting'''. This works by having the service worker intercept the `POST` submission to `wp-comments-post.php`: it makes the request, and if it fails fails due to the user being offline, the service worker will replay it later when the user comes back online via the [https://github.com/WICG/BackgroundSync BackgroundSync API]. However, if client-side validation was not performed then it is possible the user omitted a required field or provided a bad email address, so when they do come back online and the comment is synced, the server would then reject it and it would be more difficult for the user then to find out that their previously-posted comment actually failed. If no filter is available for removing the `novalidate` attribute, then it has to get removed via hacks like using JS or via PHP with output buffering. |
| 13 | If `novalidate` remains important to keep there is a case for optionally allowing it to be removed in order to rely only on client-side validation only. The [https://wordpress.org/plugins/pwa/ PWA feature plugin] adds support for '''Offline Commenting'''. This works by having the service worker intercept the `POST` submission to `wp-comments-post.php`: it then makes the request, and if it fails fails due to the user being offline, the service worker will replay it later when the user comes back online via the [https://github.com/WICG/BackgroundSync BackgroundSync API]. However, if client-side validation was not performed then it is possible the user omitted a required field or provided a bad email address, so when they do come back online and the comment is synced, the server would then reject it and it would be more difficult for the user then to find out that their previously-posted comment actually failed. If no filter is available for removing the `novalidate` attribute, then it has to get removed via hacks like using JS or via PHP with output buffering. |