diff --git a/user_guide_src/source/changelogs/v4.5.6.rst b/user_guide_src/source/changelogs/v4.5.6.rst index ba415de7e00c..33e3e5a1a0ab 100644 --- a/user_guide_src/source/changelogs/v4.5.6.rst +++ b/user_guide_src/source/changelogs/v4.5.6.rst @@ -22,9 +22,6 @@ Message Changes Changes ******* -- **Validation:** Rule ``is_unique`` and ``is_not_unique`` now accept an optional - ``dbGroup`` as parameter. - ************ Deprecations ************ diff --git a/user_guide_src/source/changelogs/v4.6.0.rst b/user_guide_src/source/changelogs/v4.6.0.rst index d3dc4529d512..be51ebaae245 100644 --- a/user_guide_src/source/changelogs/v4.6.0.rst +++ b/user_guide_src/source/changelogs/v4.6.0.rst @@ -219,6 +219,8 @@ Libraries See :ref:`FileCollection::retainMultiplePatterns() `. - **Validation:** Added ``min_dims`` validation rule to ``FileRules`` class. See :ref:`Validation `. +- **Validation:** Rule ``is_unique`` and ``is_not_unique`` now accept an optional + ``dbGroup`` as parameter. See :ref:`Validation `. Helpers and Functions ===================== diff --git a/user_guide_src/source/libraries/validation.rst b/user_guide_src/source/libraries/validation.rst index 515a37a3277b..2111e5c526b1 100644 --- a/user_guide_src/source/libraries/validation.rst +++ b/user_guide_src/source/libraries/validation.rst @@ -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]``. @@ -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. @@ -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.