Skip to content

Conversation

@andrepimpao
Copy link
Contributor

As an example, when validating an array with collection and a name was given, the assert message would not display the index in the array where the error occurred.

$input = ['name' => ''];

Validator::collection([
  'name' => Validator::notBlank()->getConstraints()
])->assert($input, name: 'collection');

Would throw the following exception message collection: This value should not be blank..
With the fix, returns collection[name]: This value should not be blank..

@andrepimpao andrepimpao merged commit 8fffe25 into 1.x Apr 1, 2025
3 checks passed
@andrepimpao andrepimpao deleted the FV-1-fix-name-on-assert-message branch April 1, 2025 14:59
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.

2 participants