Skip to content

Commit e33b5b2

Browse files
committed
[#11756] Added a bit more info on transformation errors
1 parent 94ba150 commit e33b5b2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

form/data_transformers.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,10 @@ and type-hint the new class::
291291
// ...
292292
}
293293

294-
Instead of defining the same ``invalid_message`` every time the form type is
295-
used, you can set the end-user error message in the data transformer using the
296-
``setInvalidMessage()`` method::
294+
Whenever the transformer throws an exception, the ``invalid_message`` is shown
295+
to the user. Instead of showing the same message every time, you can set the
296+
end-user error message in the data transformer using the
297+
``setInvalidMessage()`` method. It also allows you to include user values::
297298

298299
// src/Form/DataTransformer/IssueToNumberTransformer.php
299300
namespace App\Form\DataTransformer;

0 commit comments

Comments
 (0)