Skip to content

[Serializer] Adds FormErrorNormalizer #13885

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
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,12 @@ There are several types of normalizers available:
This normalizer converts :phpclass:`DateInterval` objects into strings.
By default, it uses the ``P%yY%mM%dDT%hH%iM%sS`` format.

:class:`Symfony\\Component\\Serializer\\Normalizer\\FormErrorNormalizer`
This normalizer works with classes that implement
:class:`Symfony\\Component\\Form\\FormInterface`.

It will get errors from the form and normalize them into an normalized array.

:class:`Symfony\\Component\\Serializer\\Normalizer\\ConstraintViolationListNormalizer`
This normalizer converts objects that implement
:class:`Symfony\\Component\\Validator\\ConstraintViolationListInterface`
Expand Down
3 changes: 3 additions & 0 deletions serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ As well as the following normalizers:
for :phpclass:`DateInterval` objects
* :class:`Symfony\\Component\\Serializer\\Normalizer\\DataUriNormalizer` to
transform :phpclass:`SplFileInfo` objects in `Data URIs`_
* :class:`Symfony\\Component\\Serializer\\Normalizer\\FormErrorNormalizer` for
objects implementing the :class:`Symfony\\Component\\Form\\FormInterface` to
normalize form errors.
* :class:`Symfony\\Component\\Serializer\\Normalizer\\JsonSerializableNormalizer`
to deal with objects implementing the :phpclass:`JsonSerializable` interface
* :class:`Symfony\\Component\\Serializer\\Normalizer\\ArrayDenormalizer` to
Expand Down
3 changes: 3 additions & 0 deletions serializer/normalizers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Symfony includes the following normalizers but you can also
transform :phpclass:`SplFileInfo` objects in `Data URIs`_
* :class:`Symfony\\Component\\Serializer\\Normalizer\\CustomNormalizer` to
normalize PHP object using an object that implements
* :class:`Symfony\\Component\\Serializer\\Normalizer\\FormErrorNormalizer` for
objects implementing the :class:`Symfony\\Component\\Form\\FormInterface` to
normalize form errors.
:class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizableInterface`;
* :class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer` to
normalize PHP object using the getter and setter methods of the object;
Expand Down