summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-05 16:25:30 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-05 16:25:30 +0200
commit6998492ec75c6fca95fd3656284d949a01a4420f (patch)
tree5ba68acb05eeaeabaae72e839f06bef830e2ba3f
parentccd01c75f5802e4e4b74bb53414a58d2aa0fd0d8 (diff)
parent19ac8bc3fc55460660cca618b6cce0ef212e7bdc (diff)
Merge pull request #1738 from RecoilUK/patch-1
Update user_guide_src/source/libraries/form_validation.rst
-rw-r--r--user_guide_src/source/libraries/form_validation.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index faf221981..29e1be032 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -488,6 +488,15 @@ the name of the function::
$this->form_validation->set_message('username_check')
+If you are using an error message that can accept two $s in your error string,
+such as ..
+
+ $this->form_validation->set_message('min_length', 'The $s field must contain at least $s characters.');
+
+Then you can also use %1$s and %2$s:
+
+ $this->form_validation->set_message('min_length', 'This field must contain at least %2$s characters.');
+
You can also override any error message found in the language file. For
example, to change the message for the "required" rule you will do this::