Skip to content
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
7 changes: 7 additions & 0 deletions en/appendices/5-1-migration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ Core
a typesafe way to cast request data or other input and return ``null`` when conversion fails.
- ``pathCombine()`` was added to help build paths without worrying about duplicate and trailing slashes.

Datasource
----------

- ``RulesChecker::remove()``, ``removeCreate()``, ``removeUpdate()``, and
``removeDelete()`` methods were added. These methods allow you to remove rules
by name.

Http
----

Expand Down
19 changes: 19 additions & 0 deletions en/orm/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -742,3 +742,22 @@ The same result can be expected when using ``newEntity()`` or

$userEntity = $usersTable->newEntity(['email' => 'not an email!!']);
$userEntity->getError('email'); // Invalid email

Removing Rules
--------------

If you need to remove rules from a ``RulesChecker`` use a remove method::

// Remove a general rule by name
$rules->remove('ruleName');

// Remove a create rule
$rules->removeCreate('ruleName');

// Remove an update rule
$rules->removeUpdate('ruleName');

// Remove a delete rule
$rules->removeDelete('ruleName');

.. versionadded:: 5.1.0