Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

allow precognitive requests to use wildcards with array validations (#57437)#57486

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
markusheinemann wants to merge1 commit intolaravel:12.x
base:12.x
Choose a base branch
Loading
frommarkusheinemann:12.x

Conversation

@markusheinemann
Copy link

@markusheinemannmarkusheinemann commentedOct 22, 2025
edited
Loading

This PR is a proposal toresolve#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 thePrecognition-Validate-Only header. Now wildcards can specified to cover all array entries.

// BeforePrecognition-Validate-Only: nested_array,nested_array.0.title,nested_array.1.title,nested_array.2.titlePrecognition-Validate-Only: raw_array,raw_array.0,raw_array.1,raw_array.2// AfterPrecognition-Validate-Only: nested_array,nested_array.*.titlePrecognition-Validate-Only: raw_array,raw_array.*

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

@timacdonald
Copy link
Member

@markusheinemann, what do you think about making this a little less strict and allow a* to match anything that isn't a.?

Just thinking it could be cool to dousers.* and it matchusers.name andusers.email.

Then you could do something likeusers.*.* to matchusers.1.name andusers.1.email, etc.

@markusheinemann
Copy link
Author

markusheinemann commentedNov 6, 2025
edited
Loading

@timacdonald Totally agree. Would be a nice convenience feature...

Would we assume thatuser.* is the same asusers.*.* but not asusers.*.email? Or should we force that the wildcard only work at on level (e.g. to matchusers.names.first the wildcardusers.*.* needs to be specified). I think the second way is more explicit.

I take a look into a adjusted implementation.

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

Reviewers

@timacdonaldtimacdonaldAwaiting requested review from timacdonald

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

CanBePrecognitive Trait dose not consider Validation Rules for Arrays

2 participants

@markusheinemann@timacdonald

[8]ページ先頭

©2009-2025 Movatter.jp