-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Add the WordCount
constraint
#57716
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
bc846f2
to
3ddca9c
Compare
src/Symfony/Component/Validator/Constraints/WordCountValidator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Tests/Constraints/WordCountTest.php
Outdated
Show resolved
Hide resolved
3ddca9c
to
c1790e4
Compare
src/Symfony/Component/Validator/Tests/Constraints/WordCountValidatorTest.php
Show resolved
Hide resolved
yield ['', 1]; // empty string should always pass and eventually be handled by NotBlankValidator | ||
} | ||
|
||
public static function provideInvalidTypes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static function provideInvalidTypes() | |
public static function provideInvalidTypes(): iterable |
c1790e4
to
37f8770
Compare
Pushed plural form of the constraint message |
src/Symfony/Component/Validator/Constraints/WordCountValidator.php
Outdated
Show resolved
Hide resolved
37f8770
to
eccd3be
Compare
eccd3be
to
4510f94
Compare
4510f94
to
21544c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the failures on AppVeyor look related, we need to skip some of the added tests when the intl extension is missing
21544c0
to
3786495
Compare
Thought of adding a check in the constraint but forgot the tests. Thanks for pointing out, I added |
Can you please create and reference a docs PR? Thanks |
@OskarStark of course, here you go: symfony/symfony-docs#20047 |
Thank you @alexandre-daubois. |
…raint (OskarStark) This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Validator] Add German translation for `WordCount` constraint | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Needs * #57716 Commits ------- b0eaf91 [Validator] Add German translation for `WordCount` constraint
…n (alexandre-daubois) This PR was merged into the 5.4 branch. Discussion ---------- [Validator] Add `WordCount` constraint French translation | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT :information_source: Requires #57716 to be merged first Commits ------- bd98f5d [Validator] Add `WordCount` constraint French translation
This PR was merged into the 7.2 branch. Discussion ---------- [Validator] Unwrap useless cast | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT After `@AlexisRossat`'s [comment](#57716 (comment)), the same cast was found at some other places in Validator. Commits ------- 15dc8bd [Validator] Unwrap useless cast
This PR was merged into the 7.2 branch. Discussion ---------- [Validator] Unwrap useless cast | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT After `@AlexisRossat`'s [comment](symfony/symfony#57716 (comment)), the same cast was found at some other places in Validator. Commits ------- 15dc8bd780 [Validator] Unwrap useless cast
…ubois) This PR was merged into the 7.2 branch. Discussion ---------- [Validator] Add the `WordCount` constraint Related to symfony/symfony#57716 Commits ------- e983455 [Validator] Add the `WordCount` constraint
Doc PR: symfony/symfony-docs#20047