diff --git a/docs/configuration.rst b/docs/configuration.rst
index 05ed1297..dd103c36 100644
--- a/docs/configuration.rst
+++ b/docs/configuration.rst
@@ -62,6 +62,6 @@ passed in under each field in your behavior configuration.
- Return: (string) the new name for the file
-- ``keepFilesOnDelete``: Keep *all* files when uploading/deleting a record.
+- ``keepFilesOnDelete``: Keep *all* files when deleting a record.
- Default: (boolean) ``true``
diff --git a/docs/installation.rst b/docs/installation.rst
index b5b1197c..b493c1f5 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -9,13 +9,13 @@ Using `Composer `__
`View on
Packagist `__,
and copy the json snippet for the latest version into your project's
-``composer.json``. Eg, v. 3.0.0 would look like this:
+``composer.json``.
.. code:: json
{
"require": {
- "josegonzalez/cakephp-upload": "3.0.0"
+ "josegonzalez/cakephp-upload": "~3.0"
}
}
diff --git a/docs/introduction.rst b/docs/introduction.rst
index 8b718a41..f398731e 100644
--- a/docs/introduction.rst
+++ b/docs/introduction.rst
@@ -23,13 +23,14 @@ What does this plugin do?
* It can also move files around programatically. Such as from the filesystem.
* The path to which the files are saved can be customised.
* The plugin can also upload multiple files at the same time to different fields.
-* Each upload field can be configured independantly of each other, such as changing the upload path etc.
+* Each upload field can be configured independently of each other, such as changing the upload path etc.
* Uploaded file information can be stored in a data store, such as a MySQL database.
* You can upload files to both disk as well as distributed datastores such as S3 or Dropbox.
+* It can optionally delete the files on record deletion
+* It offers multiple validation providers but doesn't validate automatically
This plugin does not do
~~~~~~~~~~~~~~~~~~~~~~~
* Create thumbnails. You can use a custom Transformer to create modified versions of file uploads.
* It will not convert files between file types. You cannot use it convert a JPG to a PNG
* It will not add watermarks to images for you.
-* It will not validate anything about your save.
diff --git a/docs/validation.rst b/docs/validation.rst
index 3f9f9659..a9c164e6 100644
--- a/docs/validation.rst
+++ b/docs/validation.rst
@@ -7,7 +7,7 @@ explicitly load the validation provider(s) and attach each rule if needed.
Installation
^^^^^^^^^^^^
-This plugin allows you to only load the validation rules that cover you needs.
+This plugin allows you to only load the validation rules that cover your needs.
At this point there are 3 validation providers:
- UploadValidation (validation rules useful for any upload)
@@ -53,7 +53,7 @@ It might come in handy to only use a validation rule when there actually is an u
'message' => 'yourErrorMessage',
'provider' => 'upload',
'on' => function($context) {
- return isset($context['data']['file']) && $context['data']['file']['error'] == UPLOAD_ERR_OK;
+ return !empty($context['data']['file']) && $context['data']['file']['error'] == UPLOAD_ERR_OK;
}
]);