Open
Description
Bug description
When using a date validation such as before_or_equal:today
in a fieldset within bard
, the validation does not work as expected. If either no or any date value is provided, the validation fails with Must be a date before or equal to today.
.
This worked in Statamic 4, as shown in the screenshots and repositories below.
How to reproduce
Statamic 4 reproduction repo: https://github.com/vintagesucks/repro-statamic-4-date-validation (no issue)
Statamic 5 reproduction repo: https://github.com/vintagesucks/repro-statamic-5-date-validation
- Login to control panel (
[email protected]
/password
) - Open
Home
page - Add
New Set
set - Click
Save & Publish
Logs
No response
Environment
Application Name: Statamic
Laravel Version: 11.30.0
PHP Version: 8.3.13
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: localhost
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file
Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.37.0 Solo
Installation
Fresh statamic/statamic site via CLI
Additional details
No response