Skip to content

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

Merged
taylorotwell merged 1 commit into
laravel:5.8from
codinglabsau:boolean-displayable-value
Aug 14, 2019
Merged

[5.8] Fix non-displayable boolean values in validation messages#29560
taylorotwell merged 1 commit into
laravel:5.8from
codinglabsau:boolean-displayable-value

Conversation

@zchlm

@zchlm zchlm commented Aug 14, 2019

Copy link
Copy Markdown

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

}

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

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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