Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add "negate" option to Expression constraint #46599

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 21, 2022
Merged

Add "negate" option to Expression constraint #46599

merged 1 commit into from
Jul 21, 2022

Conversation

fmata
Copy link
Contributor

@fmata fmata commented Jun 6, 2022

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.

@carsonbot carsonbot added this to the 6.2 milestone Jun 6, 2022
@fmata fmata changed the title Add "pass" option to Expression constraint [Validator] Add "pass" option to Expression constraint Jun 6, 2022
@OskarStark
Copy link
Contributor

I like the idea but struggle a bit with "pass" naming. What about "negate" or sth else?

@fmata
Copy link
Contributor Author

fmata commented Jun 6, 2022

@OskarStark better 👍 pushed.

@fmata fmata changed the title [Validator] Add "pass" option to Expression constraint [Validator] Add "negate" option to Expression constraint Jun 6, 2022
@carsonbot carsonbot changed the title [Validator] Add "negate" option to Expression constraint Add "negate" option to Expression constraint Jul 21, 2022
@fabpot
Copy link
Member

fabpot commented Jul 21, 2022

Thank you @fmata.

@fabpot fabpot merged commit 9ccf365 into symfony:6.2 Jul 21, 2022
@fmata fmata deleted the constraint-expression branch July 21, 2022 14:43
OskarStark added a commit to symfony/symfony-docs that referenced this pull request Jul 22, 2022
… option (Florent Mata)

This PR was merged into the 6.2 branch.

Discussion
----------

[Validator] Update Expression constraint with "negate" option

symfony/symfony#46599

Commits
-------

0ca9832 Update Expression constraint with "negate" option
@fabpot fabpot mentioned this pull request Oct 24, 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.

4 participants