Skip to content

Can't save validation rule with {this} in it #14806

Description

@edalzell

Bug description

I was trying to set a field (time picker) to throw a validation error if it was before another time field. As per the docs I entered after:{this}.start_time and clicked saved. I got the Saved toast but the rule wasn't actually saved to the fieldset.

How to reproduce

In a fieldset that it's imported into a blueprint:

  • add start_time as a time field
  • add end_time as a time field
  • enter after:{this}.start_time in the end_time`'s validation
  • click save

Logs

Environment

Environment
Laravel Version: 12.62.0
PHP Version: 8.5.7
Composer Version: 2.10.1
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en_US

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

Storage
public/storage: NOT LINKED

Statamic
Addons: 1
License Key: Not set
Sites: 2 (Statamic, Arabic)
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.21.0 PRO

Statamic Addons
transformstudios/events: dev-161-isrecurring-does-not-include-every

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions