Skip to content

[Validator] Update Expression constraint with "negate" option #16852

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
Jul 22, 2022

Conversation

fmata
Copy link
Contributor

@fmata fmata commented Jun 6, 2022

@fmata fmata requested a review from xabbuh as a code owner June 6, 2022 15:33
@carsonbot carsonbot added this to the 6.2 milestone Jun 6, 2022
@javiereguiluz javiereguiluz added Validator Waiting Code Merge Docs for features pending to be merged labels Jun 6, 2022
@carsonbot carsonbot changed the title Update Expression constraint with "pass" option [Validator] Update Expression constraint with "pass" option Jun 6, 2022
@carsonbot carsonbot modified the milestones: 6.2, next Jun 6, 2022
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.

versionadded directive is missing

@fmata fmata force-pushed the constraint-expression branch from 51a7463 to a8909ec Compare June 6, 2022 20:43
@fmata fmata changed the title [Validator] Update Expression constraint with "pass" option [Validator] Update Expression constraint with "negate" option Jun 6, 2022
fabpot added a commit to symfony/symfony that referenced this pull request Jul 21, 2022
This PR was merged into the 6.2 branch.

Discussion
----------

Add "negate" option to Expression constraint

| Q             | A
| ------------- | ---
| Branch?       | 6.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | symfony/symfony-docs#16852

Using `Expression` constraint is tedious because the written expression is the opposite of the error message. Adding `negate` option (naming ?) as `Regex::$match` allow us to write condition in phase with the wording.

Commits
-------

4bc245e Add "pass" option to Expression constraint
symfony-splitter pushed a commit to symfony/validator that referenced this pull request Jul 21, 2022
This PR was merged into the 6.2 branch.

Discussion
----------

Add "negate" option to Expression constraint

| Q             | A
| ------------- | ---
| Branch?       | 6.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | symfony/symfony-docs#16852

Using `Expression` constraint is tedious because the written expression is the opposite of the error message. Adding `negate` option (naming ?) as `Regex::$match` allow us to write condition in phase with the wording.

Commits
-------

4bc245e5a9 Add "pass" option to Expression constraint
@fmata
Copy link
Contributor Author

fmata commented Jul 22, 2022

Comments addressed.

@fmata fmata force-pushed the constraint-expression branch from 0f2f72e to 0ca9832 Compare July 22, 2022 06:07
@OskarStark OskarStark removed the Waiting Code Merge Docs for features pending to be merged label Jul 22, 2022
@OskarStark
Copy link
Contributor

Thanks for your work on this new feature!

@OskarStark OskarStark merged commit 0ef1875 into symfony:6.2 Jul 22, 2022
@fmata fmata deleted the constraint-expression branch July 22, 2022 09:31
@xabbuh xabbuh modified the milestones: next, 6.2 Jul 22, 2022
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.

6 participants