-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Another collection of fixes: Typos, Formatting, Logic, Links #3174
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ of an ``Author`` class exactly equal to ``null``, you could do the following: | |
Acme\BlogBundle\Entity\Author: | ||
properties: | ||
firstName: | ||
- 'Null': ~ | ||
- "Null": ~ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to be consistent with the examples for the True and False validators, i.e. all validators using reserved Twig words. Both are using double quotes. We could also change those to single quotes or is there a reason to not making it consistent? Actually, in PHP I think single quotes are the standard, what about Yaml? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In yaml all reserved words (true, false, null) are put in single quotes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, so I'll change it for the True and False validator instead. |
||
|
||
.. code-block:: php-annotations | ||
|
||
|
@@ -77,6 +77,11 @@ of an ``Author`` class exactly equal to ``null``, you could do the following: | |
} | ||
} | ||
|
||
.. caution:: | ||
|
||
When using YAML, be sure to surround ``Null`` with quotes (``"Null"``) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. null (lowercase) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But the validator's name is "Null" (uc first). For the next line it could be "...YAML will convert this into a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, sorry. You only need to change the next line |
||
or else YAML will convert this into a Null value. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. null There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean like ...or else YAML will convert this into a |
||
|
||
Options | ||
------- | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,11 @@ Then you can constrain this method with ``True``. | |
|
||
If the ``isTokenValid()`` returns false, the validation will fail. | ||
|
||
.. caution:: | ||
|
||
When using YAML, be sure to surround ``True`` with quotes (``"True"``) | ||
or else YAML will convert this into a Boolean value. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. true Boolean value |
||
|
||
Options | ||
------- | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
.. versionadded:: 2.1 | ||
The ``error_mapping`` option is new to Symfony 2.1. | ||
|
||
error_mapping | ||
~~~~~~~~~~~~~ | ||
|
||
**type**: ``array`` **default**: ``empty`` | ||
|
||
.. versionadded:: 2.1 | ||
The ``error_mapping`` option is new to Symfony 2.1. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't know why all have this wording, i think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be indented by 4 spaces. And I'm -1 for this change, as it will get removed in 2.3, so it's useless to add it only to 2.2 imo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But these "2.1" notes will last in the 2.2 branch, right? So why no update them in 2.2 as long as the 2.2 branch is maintained? |
||
|
||
This option allows you to modify the target of a validation error. | ||
|
||
Imagine you have a custom method named ``matchingCityAndZipCode`` that validates | ||
|
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.
please edit this to use 4 spaces