diff --git a/user_guide_src/source/libraries/validation.rst b/user_guide_src/source/libraries/validation.rst index de7ec194a61c..36a7e4912283 100644 --- a/user_guide_src/source/libraries/validation.rst +++ b/user_guide_src/source/libraries/validation.rst @@ -974,6 +974,9 @@ Rule Parameter Description ======================= ========== ============================================= =================================================== uploaded Yes Fails if the name of the parameter does not ``uploaded[field_name]`` match the name of any uploaded files. + If you want the file upload to be optional + (not required), do not define this rule. + max_size Yes Fails if the uploaded file named in the ``max_size[field_name,2048]`` parameter is larger than the second parameter in kilobytes (kb). Or if the file @@ -995,3 +998,7 @@ is_image Yes Fails if the file cannot be determined to be ======================= ========== ============================================= =================================================== The file validation rules apply for both single and multiple file uploads. + +.. note:: Only rules specifically created for file validation (like the ones listed in the table above) can be used to validate files. + Therefore, adding any general rules, like ``permit_empty``, to file validation rules array or string, the file validation will not + work correctly.