Skip to content

Commit 945758d

Browse files
authored
Merge pull request #1238 from samsonasik/docfix-validation-errors-function
doc fix: replace validation_errors() function with \Config\Services::validation()->listErrors()
2 parents 8ca894a + 604bacf commit 945758d

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

user_guide_src/source/tutorial/create_news_items.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ you haven't written any information to the database yet. In this section
77
you'll expand your news controller and model created earlier to include
88
this functionality.
99

10-
.. note:: This section of the tutorial cannot be completed as certain
11-
portions of the framework, like the form helper and the validation
12-
library have not been completed yet.
13-
1410
Create a form
1511
-------------
1612

@@ -24,7 +20,7 @@ the slug from our title in the model. Create the new view at
2420

2521
<h2><?= esc($title); ?></h2>
2622

27-
<?= validation_errors(); ?>
23+
<?= \Config\Services::validation()->listErrors(); ?>
2824

2925
<?= form_open('news/create'); ?>
3026

@@ -39,7 +35,7 @@ the slug from our title in the model. Create the new view at
3935
</form>
4036

4137
There are only two things here that probably look unfamiliar to you: the
42-
``form_open()`` function and the ``validation_errors()`` function.
38+
``form_open()`` function and the ``\Config\Services::validation()->listErrors()`` function.
4339

4440
The first function is provided by the :doc:`form
4541
helper <../helpers/form_helper>` and renders the form element and

0 commit comments

Comments
 (0)