Skip to content

Commit bfe27c0

Browse files
committed
Add explanation where to place custom rules error messages
1 parent 521cc98 commit bfe27c0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

user_guide_src/source/libraries/validation.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,12 @@ a boolean true or false value signifying true if it passed the test or false if
760760

761761
.. literalinclude:: validation/034.php
762762

763-
By default, the system will look within **system/Language/en/Validation.php** for the language strings used
764-
within errors. In custom rules, you may provide error messages by accepting a ``&$error`` variable by reference in the
765-
second parameter:
763+
By default, the system will look within **system/Language/en/Validation.php** for the language strings used within
764+
errors. To provide default error messages for your custom rules, you may place them in **app/Language/en/Validation.php**
765+
(and/or corresponding folder of locale you use in place of ``en``). Also, in case you want to use some other language
766+
string file in place of the default **Validation.php**, you may provide error messages by accepting an ``&$error``
767+
variable by reference in the second (or, in case your rule needs to work with parameters, as cescribed below – the
768+
fourth) parameter:
766769

767770
.. literalinclude:: validation/035.php
768771

0 commit comments

Comments
 (0)