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

Conversation

@zchlm
Copy link
Contributor

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';

This comment has been minimized.

Copy link
@DonJorgen

DonJorgen Aug 14, 2019

what about other languages?

This comment has been minimized.

Copy link
@zchlm

zchlm Aug 14, 2019

Author Contributor

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

This comment has been minimized.

Copy link
@fgilio

fgilio Aug 20, 2019

Contributor

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

@taylorotwell taylorotwell merged commit 3069091 into laravel:5.8 Aug 14, 2019

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@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 codinglabsau:boolean-displayable-value branch Aug 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.