Skip to content

Add support for list validation rule#1016

Open
d3radicated wants to merge 1 commit intoknuckleswtf:v5from
d3radicated:feat/list-validation-rule
Open

Add support for list validation rule#1016
d3radicated wants to merge 1 commit intoknuckleswtf:v5from
d3radicated:feat/list-validation-rule

Conversation

@d3radicated
Copy link

This PR adds support for the list validation rule. Currently, the generated type for lists is string.

Just whipped this up on a whim. Willing to add tests but I don't know it it will break tests since list rule was only added on Laravel 11 and up.

@shalvah
Copy link
Contributor

shalvah commented Aug 2, 2025

For testing, just do something like this!

if (version_compare(Application::VERSION, '8.53', '>=')) {
yield 'accepted_if' => [
['accepted_if_param' => 'accepted_if:another_field,a_value'],
[],
[
'type' => 'boolean',
'description' => "Must be accepted when <code>another_field</code> is <code>a_value</code>.",

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants