Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Validator] Add a new constraint message when there is both min and max#32435
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
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
ContributorAuthor
Lctrs commentedJul 8, 2019
Mistake on my side. Label |
fabpot requested changesJul 8, 2019
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas approved these changesJul 10, 2019
fabpot approved these changesJul 12, 2019
Member
fabpot commentedJul 12, 2019
Thank you@Lctrs. |
fabpot added a commit that referenced this pull requestJul 12, 2019
… both min and max (Lctrs)This PR was squashed before being merged into the 4.4 branch (closes#32435).Discussion----------[Validator] Add a new constraint message when there is both min and max| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | Part of#31503| License | MIT| Doc PR | to doCurrently, the failed validation messages in the `Range` constraint doesn't carry a notion of range. This can be confusing and error-prone if we report these messages to the user as-is.This PR introduces a new message to the `Range` constraint (`This value should be between {{ min }} and {{ max }}.`) that will be displayed if both `min` and `max` are not `null`.Commits-------c5488bc [Validator] Add a new constraint message when there is both min and max
fabpot added a commit that referenced this pull requestJul 12, 2019
…nge validator (javiereguiluz)This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes#32510).Discussion----------[Validator] Added the Spanish translation for the new Range validator| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | -| License | MIT| Doc PR | -Translation for#32435.Commits-------41f51fd [Validator] Added the Spanish translation for the new Range validator
This was referencedJul 12, 2019
fabpot added a commit that referenced this pull requestJul 12, 2019
…PReimers)This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes#32518).Discussion----------[Validator] Add german translation for Range validator| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -German translation for#32435Commits-------d392e49 Add german translation for Range validator
fabpot added a commit that referenced this pull requestJul 12, 2019
…PReimers)This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes#32519).Discussion----------[Validator] Add danish translation for Range validator| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -Danish translation for#32435Commits-------dc2e36d Add danish translation for Range validator
fabpot added a commit that referenced this pull requestJul 12, 2019
…ge validator (IonBazan)This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes#32517).Discussion----------[Validator] Added the Polish translation for the new Range validator| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -Polish translation for#32435.Commits-------b35131a Add notInRange translation
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestJul 12, 2019
…tion (Lctrs)This PR was merged into the 4.4 branch.Discussion----------[Validator] Document the new notInRangeMessage optionRef. PR :symfony/symfony#32435Closesymfony#11952Commits-------61641ca [Validator] Document the new notInRangeMessage option
fabpot added a commit that referenced this pull requestJul 15, 2019
…or (norkunas)This PR was merged into the 3.4 branch.Discussion----------[Validator] Add Lithuanian translation for Range validator| Q | A| ------------- | ---| Branch? | 3.4 <!-- see below -->| Bug fix? | no| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | - <!-- required for new features -->Translation for#32435.<!--Replace this notice by a short README for your feature/bugfix. This will help peopleunderstand your PR and can be used as a start for the documentation.Additionally (seehttps://symfony.com/roadmap): - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against branch 4.4. - Legacy code removals go to the master branch.-->Commits-------20ef151 [Validator] Add Lithuanian translation for Range validator
fabpot added a commit that referenced this pull requestJul 15, 2019
This PR was squashed before being merged into the 3.4 branch (closes#32539).Discussion----------[Validator] Add missing Hungarian translations| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | no| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | - <!-- required for new features --><!--Replace this notice by a short README for your feature/bugfix. This will help peopleunderstand your PR and can be used as a start for the documentation.Additionally (seehttps://symfony.com/roadmap): - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against branch 4.4. - Legacy code removals go to the master branch.-->It has 2 messages translated to Hungarian introduced in#27738 and#32435. AFAIK it should be based on 3.4, but tell me if I should rebase any of the commits.Commits-------2fee912 [Validator] Add missing Hungarian translations
symfony-splitter pushed a commit to symfony/validator that referenced this pull requestJul 15, 2019
This PR was squashed before being merged into the 3.4 branch (closes #32539).Discussion----------[Validator] Add missing Hungarian translations| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | no| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | - <!-- required for new features --><!--Replace this notice by a short README for your feature/bugfix. This will help peopleunderstand your PR and can be used as a start for the documentation.Additionally (seehttps://symfony.com/roadmap): - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against branch 4.4. - Legacy code removals go to the master branch.-->It has 2 messages translated to Hungarian introduced insymfony/symfony#27738 andsymfony/symfony#32435. AFAIK it should be based on 3.4, but tell me if I should rebase any of the commits.Commits-------2fee9124ba [Validator] Add missing Hungarian translations
This was referencedMar 18, 2020
fabpot added a commit that referenced this pull requestAug 12, 2020
…d max are set (l-vo)This PR was merged into the 4.4 branch.Discussion----------[Validator] Add BC layer for notInRangeMessage when min and max are set| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#36133| License | MIT| Doc PR |According to#36133, the improvement added in#32435 may lead to a BC break when the developer pass `min` and `max` options and a custom `minMessage` or `maxMessage`. In this case it's expected to receive a `minMessage`/`maxMessage` in the violation but a `notInRangeMessage` is received instead.So in the following conditions:- `min` and `max` options are set- `minMessage` or `maxMessage` is setA deprecation is triggered. If a limit is violated and matches to the min/max message passed as option (`minMessage` for `min` violated and `maxMessage` for `max` violated), `minMessage/maxMessage` is used in the violation instead of `notInRangeMessage`.Commits-------092d85c [Validator] Add BC layer for notInRangeMessage when min and max are set
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
Currently, the failed validation messages in the
Rangeconstraint doesn't carry a notion of range. This can be confusing and error-prone if we report these messages to the user as-is.This PR introduces a new message to the
Rangeconstraint (This value should be between {{ min }} and {{ max }}.) that will be displayed if bothminandmaxare notnull.