Skip to content

Commit

Permalink
minor #5102 Removed duplicate "long"s in length constraint (ByStones)
Browse files Browse the repository at this point in the history
This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #5102).

Discussion
----------

Removed duplicate "long"s in length constraint

| Q             | A
| ------------- | ---
| Doc fix?      | [yes]
| New docs?     | [no]
| Applies to    | 2.5+

The maxMessage seems to have one long too many. This does apply to all maintained versions.

Alternative could be:
```
maxMessage: "Your first name cannot be more than {{ limit }} characters long"
```

Commits
-------

dcffc02 Removed duplicate "long"s
  • Loading branch information
weaverryan committed Mar 24, 2015
2 parents c19598a + dcffc02 commit b07c0f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions reference/constraints/Length.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To verify that the ``firstName`` field length of a class is between "2" and
min: 2
max: 50
minMessage: "Your first name must be at least {{ limit }} characters long"
maxMessage: "Your first name cannot be longer than {{ limit }} characters long"
maxMessage: "Your first name cannot be longer than {{ limit }} characters"
.. code-block:: php-annotations
Expand All @@ -52,7 +52,7 @@ To verify that the ``firstName`` field length of a class is between "2" and
* min = 2,
* max = 50,
* minMessage = "Your first name must be at least {{ limit }} characters long",
* maxMessage = "Your first name cannot be longer than {{ limit }} characters long"
* maxMessage = "Your first name cannot be longer than {{ limit }} characters"
* )
*/
protected $firstName;
Expand All @@ -72,7 +72,7 @@ To verify that the ``firstName`` field length of a class is between "2" and
<option name="min">2</option>
<option name="max">50</option>
<option name="minMessage">Your first name must be at least {{ limit }} characters long</option>
<option name="maxMessage">Your first name cannot be longer than {{ limit }} characters long</option>
<option name="maxMessage">Your first name cannot be longer than {{ limit }} characters</option>
</constraint>
</property>
</class>
Expand All @@ -94,7 +94,7 @@ To verify that the ``firstName`` field length of a class is between "2" and
'min' => 2,
'max' => 50,
'minMessage' => 'Your first name must be at least {{ limit }} characters long',
'maxMessage' => 'Your first name cannot be longer than {{ limit }} characters long',
'maxMessage' => 'Your first name cannot be longer than {{ limit }} characters',
)));
}
}
Expand Down

0 comments on commit b07c0f4

Please sign in to comment.