Skip to content

Commit c672b2b

Browse files
committed
Add note on incompatibility of general rules for file validation use
1 parent c4bd34e commit c672b2b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

user_guide_src/source/libraries/validation.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,9 @@ Rule Parameter Description
971971
======================= ========== ============================================= ===================================================
972972
uploaded Yes Fails if the name of the parameter does not ``uploaded[field_name]``
973973
match the name of any uploaded files.
974+
Prevents form from validating if file upload
975+
is required.
976+
974977
max_size Yes Fails if the uploaded file named in the ``max_size[field_name,2048]``
975978
parameter is larger than the second
976979
parameter in kilobytes (kb). Or if the file
@@ -992,3 +995,7 @@ is_image Yes Fails if the file cannot be determined to be
992995
======================= ========== ============================================= ===================================================
993996

994997
The file validation rules apply for both single and multiple file uploads.
998+
999+
.. note:: Only rules specifically created for file validation (like the ones listed in the table above) can be used to validate files.
1000+
Therefore, adding any general rules, like ``permit_empy``, to file validation rules array or string will prevend all rules for the
1001+
from file from being processed during validation.

0 commit comments

Comments
 (0)