Skip to content

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

Closed

Description

@florianbrinkmann

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

Activity

  1. 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[/+] on May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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