[wp-trac] [WordPress Trac] #65281: Custom Time & Date Format Fields Allow Empty Save Instead of Validation
WordPress Trac
noreply at wordpress.org
Sun May 24 12:52:44 UTC 2026
#65281: Custom Time & Date Format Fields Allow Empty Save Instead of Validation
-------------------------------------------------+-------------------------
Reporter: ashirhabib | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Date/Time | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has-test- | Focuses:
info | administration
-------------------------------------------------+-------------------------
Comment (by khokansardar):
Replying to [comment:3 westonruter]:
> Adding client-side validation as well would be welcome.
Thanks for the feedback @westonruter. Added client-side validation on on
the PR.
The General Settings form now blocks submission when Custom is selected
and the date or time format field is empty. Invalid rows use the standard
admin `form-invalid` styling, focus moves to the first invalid field, and
the error is announced via `wp.a11y.speak()`.
This builds on the server-side validation in the first commit. PHPUnit
tests for `sanitize_option()` continue to pass.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65281#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list