Skip to content

Commit

Permalink
Merge pull request #7429 from kenjis/add-ValidationInterface-getValid…
Browse files Browse the repository at this point in the history
…ated

feat: add ValidationInterface::getValidated()
  • Loading branch information
kenjis authored Apr 15, 2023
2 parents 82a30b8 + fd5b430 commit 298a392
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion system/Validation/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function check($value, $rule, array $errors = []): bool
}

/**
* Returns actually validated data.
* Returns the actual validated data.
*/
public function getValidated(): array
{
Expand Down
5 changes: 5 additions & 0 deletions system/Validation/ValidationInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,9 @@ public function listErrors(string $template = 'list'): string;
* Displays a single error in formatted HTML as defined in the $template view.
*/
public function showError(string $field, string $template = 'single'): string;

/**
* Returns the actual validated data.
*/
public function getValidated(): array;
}
4 changes: 4 additions & 0 deletions user_guide_src/source/changelogs/v4.4.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ or more was specified. See :ref:`upgrade-440-uri-setsegment`.

The next segment (``+1``) of the current last segment can be set as before.

.. _v440-interface-changes:

Interface Changes
=================

.. note:: As long as you have not extended the relevant CodeIgniter core classes
or implemented these interfaces, all these changes are backward compatible
and require no intervention.

- **Validation:** Added the ``getValidated()`` method in ``ValidationInterface``.

Method Signature Changes
========================

Expand Down
6 changes: 6 additions & 0 deletions user_guide_src/source/installation/upgrade_440.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ by defining your own exception handler.

See :ref:`custom-exception-handlers` for the detail.

Interface Changes
=================

Some interface changes have been made. Classes that implement them should update
their APIs to reflect the changes. See :ref:`v440-interface-changes` for details.

Mandatory File Changes
**********************

Expand Down

0 comments on commit 298a392

Please sign in to comment.