Skip to content

Commit

Permalink
docs update for v4.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
maniaba committed Oct 7, 2024
1 parent 325ffdc commit 2fdc559
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 0 additions & 3 deletions user_guide_src/source/changelogs/v4.5.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ Message Changes
Changes
*******

- **Validation:** Rule ``is_unique`` and ``is_not_unique`` now accept an optional
``dbGroup`` as parameter.

************
Deprecations
************
Expand Down
2 changes: 2 additions & 0 deletions user_guide_src/source/changelogs/v4.6.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ Libraries
See :ref:`FileCollection::retainMultiplePatterns() <file-collections-retain-multiple-patterns>`.
- **Validation:** Added ``min_dims`` validation rule to ``FileRules`` class. See
:ref:`Validation <rules-for-file-uploads>`.
- **Validation:** Rule ``is_unique`` and ``is_not_unique`` now accept an optional
``dbGroup`` as parameter. See :ref:`Validation <rules-for-general-use>`.

Helpers and Functions
=====================
Expand Down
8 changes: 4 additions & 4 deletions user_guide_src/source/libraries/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ Available Rules
.. note:: Rule is a string; there must be **no spaces** between the parameters, especially the ``is_unique`` rule.
There can be no spaces before and after ``ignore_value``.

.. note:: Since version v4.5.6, you can optionally include ``dbGroup`` in validation rules like ``is_unique`` and ``is_not_unique``.
.. note:: Since version v4.6.0, you can optionally include ``dbGroup`` in validation rules like ``is_unique`` and ``is_not_unique``.
This allows specifying which database connection to use during validation, giving you more flexibility when working with multiple databases.
To use ``dbGroup``, you place it before the table name in the validation rule, like this:
``is_unique[dbGroup.table.field,ignore_field,ignore_value]`` or ``is_not_unique[dbGroup.table.field,where_field,where_value]``.
Expand Down Expand Up @@ -959,12 +959,12 @@ is_natural_no_zero No Fails if field contains anything other than
is_not_unique Yes Checks the database to see if the given value ``is_not_unique[table.field,where_field,where_value]`` or ``is_not_unique[dbGroup.table.field,where_field,where_value]``
exists. Can ignore records by field/value to
filter (currently accept only one filter).
(Since v4.5.6, you can optionally pass
(Since v4.6.0, you can optionally pass
the dbGroup as a parameter)
is_unique Yes Checks if this field value exists in the ``is_unique[table.field,ignore_field,ignore_value]`` or ``is_unique[dbGroup.table.field,ignore_field,ignore_value]``
database. Optionally set a column and value
to ignore, useful when updating records to
ignore itself. (Since v4.5.6, you can
ignore itself. (Since v4.6.0, you can
optionally pass the dbGroup as a parameter)
less_than Yes Fails if field is greater than or equal to ``less_than[8]``
the parameter value or not numeric.
Expand Down Expand Up @@ -1104,7 +1104,7 @@ min_dims Yes Fails if the minimum width and height of an
parameter is the field name. The second is
the width, and the third is the height. Will
also fail if the file cannot be determined
to be an image. (This rule was added in
to be an image. (This rule was added in
v4.6.0.)
mime_in Yes Fails if the file's mime type is not one ``mime_in[field_name,image/png,image/jpeg]``
listed in the parameters.
Expand Down

0 comments on commit 2fdc559

Please sign in to comment.