summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/installation/upgrade_300.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-12-14 10:07:13 +0100
committerAndrey Andreev <narf@bofh.bg>2012-12-14 10:07:13 +0100
commitd4eec9f3638cc31dc8965f929b74a2b3b201b8b7 (patch)
treeaf47abe9c0e35731a2e6260b92a97e47cf6dabdc /user_guide_src/source/installation/upgrade_300.rst
parent749f2503dc055fa7e1f376af6435f500eb5db0e1 (diff)
Fix issue #539
Form validation language line keys were not prefixed. They are now prefixed with 'form_validation_' in order to avoid collisions. The old keys will still work if a prefixed match is not found, but are DEPRECATED and will be removed in the next major version. Also added upgrade notes and changelog entries for the new error message format from PR #961.
Diffstat (limited to 'user_guide_src/source/installation/upgrade_300.rst')
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst38
1 files changed, 34 insertions, 4 deletions
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index ef5fbdf71..ff601867e 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -138,7 +138,7 @@ If your application relies on IF EXISTS, you'll have to change its usage.
Step 11: Change usage of Email library with multiple emails
***********************************************************
-The :doc:`Email library <../libraries/email>` will automatically clear the
+The :doc:`Email Library <../libraries/email>` will automatically clear the
set parameters after successfully sending emails. To override this behaviour,
pass FALSE as the first parameter in the ``send()`` method:
@@ -149,13 +149,43 @@ pass FALSE as the first parameter in the ``send()`` method:
// Parameters won't be cleared
}
+***************************************************
+Step 12: Update your Form_validation language lines
+***************************************************
+
+Two improvements have been made to the :doc:`Form Validation Library
+<../libraries/form_validation>`'s :doc:`language <../libraries/language>`
+files and error messages format:
+
+ - :doc:`Language Library <../libraries/language>` line keys now must be
+ prefixed with **form_validation_** in order to avoid collisions::
+
+ // Old
+ $lang['rule'] = ...
+
+ // New
+ $lang['form_validation_rule'] = ...
+
+ - The error messages format has been changed to use named parameters, to
+ allow more flexibility than what `sprintf()` offers::
+
+ // Old
+ 'The %s field does not match the %s field.'
+
+ // New
+ 'The {field} field does not match the {param} field.'
+
+.. note:: The old formatting still works, but the non-prefixed line keys
+ are DEPRECATED and scheduled for removal in CodeIgniter 3.1+.
+ Therefore you're encouraged to update its usage sooner rather than
+ later.
****************************************************************
-Step 12: Remove usage of (previously) deprecated functionalities
+Step 13: Remove usage of (previously) deprecated functionalities
****************************************************************
-In addition to the ``$autoload['core']`` configuration setting, there's a number of other functionalities
-that have been removed in CodeIgniter 3.0.0:
+In addition to the ``$autoload['core']`` configuration setting, there's a
+number of other functionalities that have been removed in CodeIgniter 3.0.0:
The SHA1 library
================