Commit ff10bca
committed
bug symfony#60270 [Validator] [WordCount] Treat 0 as one character word and do not exclude it (sidz)
This PR was squashed before being merged into the 7.2 branch.
Discussion
----------
[Validator] [WordCount] Treat 0 as one character word and do not exclude it
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | no
| License | MIT
New **WordCount** validator has been introduced in the Symfony 7.2 but it has an issue and treats sentence ended on zero (0) as contains an empty string.
This PR adds a callback function into `array_filter` to fix the issue.
Commits
-------
6fded36 [Validator] [WordCount] Treat 0 as one character word and do not exclude itFile tree
2 files changed
+2
-1
lines changed- src/Symfony/Component/Validator
- Constraints
- Tests/Constraints
2 files changed
+2
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
0 commit comments