8000 Range in Number Constraints is misleading · Issue #10229 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Range in Number Constraints is misleading #10229

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

Closed
alexander-schranz opened this issue Aug 28, 2018 · 3 comments
Closed

Range in Number Constraints is misleading #10229

alexander-schranz opened this issue Aug 28, 2018 · 3 comments
Labels
hasPR A Pull Request has already been submitted for this issue. Validator

Comments

@alexander-schranz
Copy link
Contributor

As the Range constraint also work for date fields the section headline Number Constraints is misleading. As I first thought that the Range will work only for numbers then.

@javiereguiluz
Copy link
Member

Thanks for reporting this issue. This is indeed confusing. What if we remove Range from "Number Constraints" and move it to "Comparison Constraints". After all, Range is just "Greater than" + "Less than".

@alexander-schranz
Copy link
Contributor Author
alexander-schranz commented Sep 3, 2018

@javiereguiluz sounds good for me created a PR #10249

@javiereguiluz javiereguiluz added the hasPR A Pull Request has already been submitted for this issue. label Sep 4, 2018
javiereguiluz added a commit that referenced this issue Sep 4, 2018
…-schranz)

This PR was squashed before being merged into the 2.8 branch (closes #10249).

Discussion
----------

Move range to the comparison constraint types

As the [Range](http://symfony.com/doc/3.4/reference/constraints/Range.html) constraint also work for **date** fields  the section headline [Number Constraints](http://symfony.com/doc/3.4/reference/constraints.html#number-constraints) is misleading. As I first thought that the Range will work only for numbers then.

fixes #10229

Commits
-------

7921ae5 Move range to the comparison constraint types
@javiereguiluz
Copy link
Member

Fixed by #10249.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hasPR A Pull Request has already been submitted for this issue. Validator
Development

No branches or pull requests

3 participants
0