Skip to content

Commit

Permalink
Added Form getError example
Browse files Browse the repository at this point in the history
  • Loading branch information
Murl080 committed Aug 14, 2023
1 parent 0d3fac0 commit 63efb47
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions en/core-libraries/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ Once a form has been validated you can retrieve the errors from it::
]
*/

$error = $form->getError('email');
/* $error contains
[
'format' => 'A valid email address is required',
]
*/

Invalidating Individual Form Fields from Controller
===================================================

Expand Down

0 comments on commit 63efb47

Please sign in to comment.