Skip to content

Conversation

@markusheinemann
Copy link

@markusheinemann markusheinemann commented Oct 22, 2025

This PR is a proposal to resolve #57437.

With this change, users can specify a wildcard to trigger all validation rules for an array field when using precognitive requests. Before the change the user had to specify all array validation rules manually in the Precognition-Validate-Only header. Now wildcards can specified to cover all array entries.

// Before
Precognition-Validate-Only: nested_array,nested_array.0.title,nested_array.1.title,nested_array.2.title
Precognition-Validate-Only: raw_array,raw_array.0,raw_array.1,raw_array.2

// After
Precognition-Validate-Only: nested_array,nested_array.*.title
Precognition-Validate-Only: raw_array,raw_array.*

PS. This is my first PR for Laravel so please forgive me mistakes. I appreciate any feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CanBePrecognitive Trait dose not consider Validation Rules for Arrays

1 participant