Skip to content

Fix validation message when there is a parameter with escaped dot "\."#53416

Merged
taylorotwell merged 3 commits into
laravel:11.xfrom
mahbubhelal:fix-validation-message
Nov 8, 2024
Merged

Fix validation message when there is a parameter with escaped dot "\."#53416
taylorotwell merged 3 commits into
laravel:11.xfrom
mahbubhelal:fix-validation-message

Conversation

@mahbubhelal

Copy link
Copy Markdown
Contributor

When there are parameters with an escaped dot in the validation rule, the error message is weird due to the dotPlaceholder not being replaced in the error message.

For example:

Validator::make([], ['name' => 'required_without:user\.name'])->validate();

Would produce an error message like "The name field is required when usery dh uny p t1 o ns i e rfname is not present."

This PR should fix that.

@taylorotwell taylorotwell merged commit 37f96f1 into laravel:11.x Nov 8, 2024
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