-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix some mistakes #10711
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
Fix some mistakes #10711
Changes from all commits
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 |
---|---|---|
|
@@ -1936,7 +1936,7 @@ ships with multiple adapters: ``cache.adapter.apcu``, ``cache.adapter.doctrine`` | |
given the adapter they are based on. Internally, a pool wraps the definition | ||
of an adapter. | ||
|
||
.. _reference-cache-systen: | ||
.. _reference-cache-system: | ||
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. Good catch, but shouldn’t this produce an error by Sphinx on build ? |
||
|
||
system | ||
...... | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,26 +7,26 @@ on your object. If you're using validation with forms, this means that you | |
can make these custom errors display next to a specific field, instead of | ||
simply at the top of your form. | ||
|
||
This process works by specifying one or more *callback* methods, each of | ||
which will be called during the validation process. Each of those methods | ||
This process works by specifying one or more *callback* functions, each of | ||
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. Again, I think this all was fine and that |
||
which will be called during the validation process. Each of those functions | ||
can do anything, including creating and assigning validation errors. | ||
|
||
.. note:: | ||
|
||
A callback method itself doesn't *fail* or return any value. Instead, | ||
as you'll see in the example, a callback method has the ability to directly | ||
A callback function itself doesn't *fail* or return any value. Instead, | ||
as you'll see in the example, a callback function has the ability to directly | ||
add validator "violations". | ||
|
||
+----------------+------------------------------------------------------------------------+ | ||
| Applies to | :ref:`class <validation-class-target>` | | ||
+----------------+------------------------------------------------------------------------+ | ||
| Options | - :ref:`callback <callback-option>` | | ||
| | - `payload`_ | | ||
+----------------+------------------------------------------------------------------------+ | ||
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Callback` | | ||
+----------------+------------------------------------------------------------------------+ | ||
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator` | | ||
+----------------+------------------------------------------------------------------------+ | ||
+----------------+-----------------------------------------------------------------------------------------------+ | ||
| Applies to | :ref:`class <validation-class-target>` or :ref:`property/method <validation-property-target>` | | ||
+----------------+-----------------------------------------------------------------------------------------------+ | ||
| Options | - :ref:`callback <callback-option>` | | ||
| | - `payload`_ | | ||
+----------------+-----------------------------------------------------------------------------------------------+ | ||
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Callback` | | ||
+----------------+-----------------------------------------------------------------------------------------------+ | ||
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator` | | ||
+----------------+-----------------------------------------------------------------------------------------------+ | ||
|
||
Configuration | ||
------------- | ||
|
@@ -88,10 +88,10 @@ Configuration | |
} | ||
} | ||
|
||
The Callback Method | ||
------------------- | ||
The Callback Function | ||
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. same here, its method |
||
--------------------- | ||
|
||
The callback method is passed a special ``ExecutionContextInterface`` object. | ||
The callback function is passed a special ``ExecutionContextInterface`` object. | ||
You can set "violations" directly on this object and determine to which | ||
field those errors should be attributed:: | ||
|
||
|
@@ -260,7 +260,7 @@ callback | |
**type**: ``string``, ``array`` or ``Closure`` [:ref:`default option <validation-default-option>`] | ||
|
||
The callback option accepts three different formats for specifying the | ||
callback method: | ||
callback function: | ||
|
||
* A **string** containing the name of a concrete or static method; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,7 +142,7 @@ With this configuration, there are three validation groups: | |
``registration`` | ||
Contains the constraints on the ``email`` and ``password`` fields only. | ||
|
||
Constraints in the ``Default`` group of a class are the constraints that have | ||
Constraints in the ``User`` group of a class are the constraints that have | ||
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 change looks wrong 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. Hi @OskarStark
this constraint is not added to the |
||
either no explicit group configured or that are configured to a group equal to | ||
the class name or the string ``Default``. | ||
|
||
|
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.
Based on the example given after the text it is
method
and notfunctions
.