Skip to content

[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

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

alexandre-daubois
Copy link
Member

@alexandre-daubois alexandre-daubois commented Jul 12, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #6813
License MIT

Doc PR: symfony/symfony-docs#20047

yield ['', 1]; // empty string should always pass and eventually be handled by NotBlankValidator
}

public static function provideInvalidTypes()
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
public static function provideInvalidTypes()
public static function provideInvalidTypes(): iterable

@alexandre-daubois
Copy link
Member Author

Pushed plural form of the constraint message

Copy link
Member

@xabbuh xabbuh left a 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

@alexandre-daubois
Copy link
Member Author

Thought of adding a check in the constraint but forgot the tests. Thanks for pointing out, I added @requires

@OskarStark
Copy link
Contributor

Can you please create and reference a docs PR? Thanks

@alexandre-daubois
Copy link
Member Author

alexandre-daubois commented Jul 17, 2024

@OskarStark of course, here you go: symfony/symfony-docs#20047

@xabbuh
Copy link
Member

xabbuh commented Jul 17, 2024

Thank you @alexandre-daubois.

@xabbuh xabbuh merged commit e63495e into symfony:7.2 Jul 17, 2024
10 checks passed
fabpot added a commit that referenced this pull request Jul 17, 2024
…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
fabpot added a commit that referenced this pull request Jul 17, 2024
…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
nicolas-grekas added a commit that referenced this pull request Jul 18, 2024
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
symfony-splitter pushed a commit to symfony/validator that referenced this pull request Jul 18, 2024
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
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Jul 19, 2024
…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
@fabpot fabpot mentioned this pull request Oct 27, 2024
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.

[RFC] [Validator] adding a new WordCount constraint validator
6 participants