Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Added {{ value }} message placeholder to UniqueEntityValidator#15279
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jperovic commentedJul 14, 2015
Just wanted to ask quick question here, to which I didn't find any answer in CONTRIBUTING document. When I run "phpunit" command, it works until it gets stuck with # Symfony\Component\Console\Helper\QuestionHelper::validateAttempts()while (null ===$attempts ||$attempts--) {if (null !==$error) {$this->writeError($output,$error); }try {returncall_user_func($question->getValidator(),$interviewer()); }catch (\Exception$error) { } } Is this known limitation? I have |
jakzal commentedJul 15, 2015
@jperovic that's a bug. I'm looking into this. |
jperovic commentedJul 15, 2015
@jakzal Cool, thanks :) |
Minishlink commentedJul 19, 2015
Hello, thanks for this ! 👍 Just a quick note: UniqueEntityValidator can have several fields. As such, one should be able to refer to all these fields in the validation message eg. "The combination of {{ field1 }} and {{ field2 }} should be unique.". Also, see#15201. You both address the same issue. |
fabpot commentedOct 19, 2015
@jakzal Are you still looking at this bug? |
jakzal commentedOct 21, 2015
fabpot commentedJan 25, 2016
Thank you@jperovic. |
This PR was merged into the 3.1 branch.Discussion----------Properly format value in UniqueEntityValidator| Q | A || --- | --- || Branch? | 3.1 || Bug fix? | yes || New feature? | no || BC breaks? | no || Deprecations? | no || Tests pass? | yes || Fixed tickets | / || License | MIT |This PR fixes a small issue introduced in#15279. Having an array in a field considered for a unique check causes an array to string conversion error in the translator. This can be avoided by formatting the value parameter with `formatValue`.Commits-------9043a55 Properly format value in UniqueEntityValidator
Apologize if I missed something. This is my first contribution to a large scale project.