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.2] bug fix and performance improvement in getCustomMessageFromTranslator #12680

Merged
merged 1 commit into from
Mar 9, 2016

Conversation

halaei
Copy link
Contributor

@halaei halaei commented Mar 9, 2016

Improvement

Since the exact match is faster and probably is needed more often , I checked for it first.

Bug fix

I replaced str_replace with preg_match to let the user have custom validation messages when validating an input like this:

['validation' => ['custom' => ['string', 'string']]]

@halaei halaei changed the title bug fix and performance improvement in getCustomMessageFromTranslator [5.2] bug fix and performance improvement in getCustomMessageFromTranslator Mar 9, 2016
@halaei
Copy link
Contributor Author

halaei commented Mar 9, 2016

Issue: #11512

@taylorotwell
Copy link
Member

Can you describe in more detail what you're trying to fix?

taylorotwell added a commit that referenced this pull request Mar 9, 2016
[5.2] bug fix and performance improvement in getCustomMessageFromTranslator
@taylorotwell taylorotwell merged commit b816831 into laravel:5.2 Mar 9, 2016
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