Skip to content

Commit 02a747f

Browse files
committed
docs: decorate variables
1 parent 2a9ab6a commit 02a747f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

user_guide_src/source/libraries/validation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ that should be applied::
232232
$validation->setRule('username', 'Username', 'required');
233233

234234
The **field name** must match the key of any data array that is sent in. If
235-
the data is taken directly from $_POST, then it must be an exact match for
235+
the data is taken directly from ``$_POST``, then it must be an exact match for
236236
the form input name.
237237

238238
setRules()
@@ -439,7 +439,7 @@ Validation Placeholders
439439

440440
The Validation class provides a simple method to replace parts of your rules based on data that's being passed into it. This
441441
sounds fairly obscure but can be especially handy with the ``is_unique`` validation rule. Placeholders are simply
442-
the name of the field (or array key) that was passed in as $data surrounded by curly brackets. It will be
442+
the name of the field (or array key) that was passed in as ``$data`` surrounded by curly brackets. It will be
443443
replaced by the **value** of the matched incoming field. An example should clarify this::
444444

445445
$validation->setRules([
@@ -686,7 +686,7 @@ a boolean true or false value signifying true if it passed the test or false if
686686
}
687687

688688
By default, the system will look within ``CodeIgniter\Language\en\Validation.php`` for the language strings used
689-
within errors. In custom rules, you may provide error messages by accepting a $error variable by reference in the
689+
within errors. In custom rules, you may provide error messages by accepting a ``$error`` variable by reference in the
690690
second parameter::
691691

692692
public function even(string $str, string &$error = null): bool
@@ -710,7 +710,7 @@ Allowing Parameters
710710
===================
711711

712712
If your method needs to work with parameters, the function will need a minimum of three parameters: the string to validate,
713-
the parameter string, and an array with all of the data that was submitted the form. The $data array is especially handy
713+
the parameter string, and an array with all of the data that was submitted the form. The ``$data`` array is especially handy
714714
for rules like ``require_with`` that needs to check the value of another submitted field to base its result on::
715715

716716
public function required_with($str, string $fields, array $data): bool

0 commit comments

Comments
 (0)