Skip to content

[5.2] Validating array using asterisk (*) against another array field doesn't do anything #11648

Closed
@bridgeport

Description

@bridgeport

Hi,

Using Laravel 5.2.6, I'm extending the Request class and returning a rule, such as:

$rules = [
    'locations.*.phones.*.number' => 'required_with:locations.*.phones.*.phone_type_id',
];

When trying to validate a multi-dimensional array field against another multi-dimensional array field using the asterisk (*) approach, it doesn't have any impact. So, it's not clear how to get the following to function if the target field also includes an asterisk:

required_if
required_unless
required_with
required_with_all
required_without
required_without_all

Is this approach not yet supported?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions