Skip to content

[Validator] Showcase custom validator constraint required option #16770

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

Merged
merged 1 commit into from
May 26, 2022

Conversation

norkunas
Copy link
Contributor

@norkunas norkunas commented May 2, 2022

Closes #16674

@norkunas norkunas requested a review from xabbuh as a code owner May 2, 2022 04:16
@carsonbot carsonbot added this to the 6.1 milestone May 2, 2022
@wouterj wouterj linked an issue May 2, 2022 that may be closed by this pull request
@wouterj
Copy link
Member

wouterj commented May 3, 2022

Hi! Thank you for your quick response.

I think it's best to create a new example (directly after the first one), e.g. "You can use #[HasNamedArguments] or getRequiredOptions() to make some constraint options required". This also allows us to add a "versionadded" box:

.. versionadded:: 6.1

    The ``#[HasNamedArguments]`` attribute was introduced in Symfony 6.1.

If you agree, are you able to make the changes? :)

@norkunas
Copy link
Contributor Author

norkunas commented May 3, 2022

Hi, will update tomorrow :)

@norkunas norkunas force-pushed the constraint-required-option branch from 8939730 to dba5d2a Compare May 4, 2022 03:43
Copy link
Member

@wouterj wouterj left a comment

Choose a reason for hiding this comment

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

Looking good, thank you!

@javiereguiluz
Copy link
Member

Thank you Tomas.

@javiereguiluz javiereguiluz merged commit ebbc61d into symfony:6.1 May 26, 2022
@norkunas norkunas deleted the constraint-required-option branch May 26, 2022 17:16
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.

[Validator] Allow creating constraints with required arguments
4 participants