Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation replacements for entry field not working inside replicator and grid #10065

Open
florianbrinkmann opened this issue May 14, 2024 · 0 comments · May be fixed by #10255
Open

Validation replacements for entry field not working inside replicator and grid #10065

florianbrinkmann opened this issue May 14, 2024 · 0 comments · May be fixed by #10255

Comments

@florianbrinkmann
Copy link

florianbrinkmann commented May 14, 2024

Bug description

I tried to use the validation replacements for an entry field (like that: validation_rule:{id}) to get the ID of the entry inside the rule. That works fine if the entry field is on the top level, but I get NULL instead of the entry ID if the field is part of a replicator or grid.

I created a PR to fix the issue #10255

How to reproduce

Add an entries field to a replicator or grid with a custom validation rule, and notice that instead of the ID we get a NULL.

Logs

No response

Environment

Environment
Application Name: app
Laravel Version: 10.48.10
PHP Version: 8.2.7
Composer Version: 2.7.2
Environment: local
Debug Mode: ENABLED
URL: example.com
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: null
Cache: statamic
Database: mysql
Logs: single
Mail: sendmail
Queue: sync
Session: file

Statamic
Addons: 0
Antlers: regex
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: v4.54.0 PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@duncanmcclean duncanmcclean changed the title [4.x] validation replacements for entry field not working inside replicator and grid Validation replacements for entry field not working inside replicator and grid May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants