[wp-trac] [WordPress Trac] #65281: Custom Time & Date Format Fields Allow Empty Save Instead of Validation

WordPress Trac noreply at wordpress.org
Wed May 20 18:43:42 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:  6.9.4
 Severity:  normal          |   Keywords:  needs-patch
  Focuses:  administration  |
----------------------------+-----------------------------
 == Title ==
 Custom Time & Date Format Fields Allow Empty Save Instead of Validation

 == Description ==
 During WordPress 7.0 release party testing, an issue was identified
 related to custom time and date format settings.

 When the custom fields for '''Time Format''' and '''Date Format''' are
 cleared (left blank), WordPress still allows the settings to be saved
 successfully.

 Although WordPress falls back to default formatting behavior internally,
 the system should validate these fields before saving.

 == Current Behavior ==

 * User clears the custom Time Format and/or Date Format fields.
 * WordPress accepts and saves the changes.
 * WordPress automatically falls back to default formatting behavior.

 == Expected Behavior ==

 * If custom Time Format or Date Format fields are empty or invalid:
   ** System should either save ''null'' values explicitly, OR
   ** Prevent saving and show a validation/error message.
 * User should be prompted to enter valid format values before settings are
 saved.

 == Suggested Validation ==

 * Restrict empty submissions for custom format fields.
 * Display an admin notice such as:

 <blockquote>
 Please configure a valid date and time format.
 </blockquote>

 == Steps to Reproduce ==

 # Go to ''Settings → General''.

 # Navigate to Date Format / Time Format settings.

 # Clear the custom format fields.

 # Click '''Save Changes'''.

 # Observe that WordPress still saves the settings without validation.

 == Impact ==

 * May create confusion for users/admins.
 * Blank or invalid custom settings can lead to inconsistent formatting
 behavior.
 * No clear indication that configuration is incomplete.

 == Environment ==

 * WordPress Version: 7.0
 * Tested during: WordPress 7.0 Release Party Testing

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65281>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list