Skip to content

getValidData() returns new elements when using dot notation #58

@henninghorn

Description

@henninghorn

I've noticed that the getValidData() returns new elements when using the dot-notation.

This is a snippet of my data

$data['logoImagePaths'] = [
    '1x' => 'http://example.com/1x.png',
    '2x' => 'http://example.com/2x.png',
];

Part of my rules:

'logoImagePaths'    => 'required|array',
'logoImagePaths.1x' => 'required|url',
'logoImagePaths.2x' => 'required|url',

And this is that getValidData returns:

print_r($validation->getValidData());
[logoImagePaths] => Array
(
    [1x] => http://example.com/1x.png
    [2x] => http://example.com/2x.png
 )

[logoImagePaths.1x] => http://example.com/1x.png
[logoImagePaths.2x] => http://example.com/2x.png

Is this expected? Or is it a bug?

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