Skip to content

Commit 0daf8c9

Browse files
committed
docs: add note about Validation rules
1 parent 3839795 commit 0daf8c9

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

user_guide_src/source/libraries/uploaded_files.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ this code and save it to your **app/Controllers/** directory::
146146
}
147147
}
148148

149+
.. note:: Since the value of a file upload HTML field doesn't exist, and is stored in the ``$_FILES`` global,
150+
only :ref:`rules-for-file-uploads` can be used to validate upload file with :doc:`validation`.
151+
The rule ``required`` also can't be used, so use ``uploaded`` instead.
152+
149153
The Upload Directory
150154
====================
151155

user_guide_src/source/libraries/validation.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,8 @@ valid_cc_number Yes Verifies that the credit card number matches
892892
HSBC Canada Card (hsbc)
893893
======================= ========== ============================================= ===================================================
894894

895+
.. _rules-for-file-uploads:
896+
895897
Rules for File Uploads
896898
======================
897899

0 commit comments

Comments
 (0)