Skip to content
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

feat: add ValidationInterface::getValidated() #7429

Merged
merged 2 commits into from
Apr 15, 2023
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
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