Skip to content

[5.8] Fixed validator not failing on custom rule when message is null - #29174

Merged
taylorotwell merged 1 commit into
laravel:5.8from
stevebauman:patch-2
Jul 15, 2019
Merged

taylorotwell merged 1 commit into
laravel:5.8from
stevebauman:patch-2

Conversation

@stevebauman

Copy link
Copy Markdown
Contributor

Issue: #29171

@stevebauman stevebauman changed the title Fixed validator not failing on custom rule when message is null [5.8] Fixed validator not failing on custom rule when message is null Jul 15, 2019
@taylorotwell
taylorotwell merged commit ec6bf0a into laravel:5.8 Jul 15, 2019
@StefanPrintezis

StefanPrintezis commented Jul 15, 2019 •

Copy link
Copy Markdown

We can also prevent messages from ever returning null since that’s not allowed to prevent any other issues. Might be a cleaner approach.

The return type of message() can be :string since 5.8 requires at least php 7.1.3.
Changing the return type will break backwards compatibility tho. So maybe next minor version?

@chriskonnertz

chriskonnertz commented Jul 16, 2019 •

Copy link
Copy Markdown

Larvel does not use type hints for return values at the moment.

@stevebauman
stevebauman deleted the patch-2 branch July 16, 2019 16:34
salmanarshad321 pushed a commit to salmanarshad321/framework that referenced this pull request Sep 23, 2026
[5.8] Fixed validator not failing on custom rule when message is null
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.

4 participants