Skip to content

[Validator] Mention exactly option for Length constraint #17764

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

Conversation

alexandre-daubois
Copy link
Member

Fixes #17059

Comment on lines +177 to +178
without passing any named argument to it. This means that for example,
``@Assert\Length(20)`` and ``@Assert\Length(exactly=20)`` are equivalent, as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the annotation part in a follow up PR against 6.0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take care of this after the merge 👌

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After my comment

@alexandre-daubois alexandre-daubois force-pushed the exactly-lenght-constraint branch from 54caa90 to 99ac309 Compare January 18, 2023 07:47
``@Assert\Length(20)`` and ``@Assert\Length(exactly=20)`` are equivalent, as
well as ``#[Assert\Length(20)]`` and ``#[Assert\Length(exactly: 20)]``.

.. versionadded::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. versionadded::
.. versionadded:: 5.2

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad 🤦 Thanks again!

@OskarStark
Copy link
Contributor

Thank you Alexandre.

OskarStark added a commit that referenced this pull request Jan 18, 2023
…aint (alexandre-daubois)

This PR was merged into the 5.4 branch.

Discussion
----------

[Validator] Mention `exactly` option for Length constraint

Fixes #17059

Commits
-------

99ac309 [Validator] Mention `exactly` option for Length constraint
@alexandre-daubois alexandre-daubois force-pushed the exactly-lenght-constraint branch from 99ac309 to 2c41c8b Compare January 18, 2023 07:58
@OskarStark
Copy link
Contributor

I already merged and added the version in fd74bd6

@OskarStark OskarStark closed this Jan 18, 2023
@alexandre-daubois alexandre-daubois deleted the exactly-lenght-constraint branch January 18, 2023 08:00
OskarStark added a commit that referenced this pull request Jan 18, 2023
…Length constraint (alexandre-daubois)

This PR was merged into the 6.0 branch.

Discussion
----------

[Validator] Remove annotations from `exactly` option of Length constraint

Follow-up #17764 (comment)

Commits
-------

13d15fa [Validator] Remove annotations from `exactly` option of Length constraint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants