Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.8] Fix non-displayable boolean values in validation messages #29560

Merged
merged 1 commit into from
Aug 14, 2019
Merged

[5.8] Fix non-displayable boolean values in validation messages #29560

merged 1 commit into from
Aug 14, 2019

Conversation

zchlm
Copy link
Contributor

@zchlm zchlm commented Aug 14, 2019

Boolean values are not represented as strings in validation messages, this PR fixes that.

@@ -320,6 +320,10 @@ public function getDisplayableValue($attribute, $value)
return $line;
}

if (is_bool($value)) {
return $value ? 'true' : 'false';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about other languages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. I'm not sure if it should be translated as it's a reference to the data type

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taylorotwell would you accept a PR that makes this strings translatable?

@taylorotwell taylorotwell merged commit 3069091 into laravel:5.8 Aug 14, 2019
@GrahamCampbell GrahamCampbell changed the title Fix non-displayable boolean values in validation messages [5.8] Fix non-displayable boolean values in validation messages Aug 14, 2019
@zchlm zchlm deleted the boolean-displayable-value branch August 14, 2019 23:38
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