@@ -603,13 +603,13 @@ shown above. The primary benefit here is that it provides some extra navigation
603603Creating a Rule Class
604604---------------------
605605
606- Within the file itself, each method is a rule and must accept a string as the first parameter, and must return
606+ Within the file itself, each method is a rule and must accept a value to validate as the first parameter, and must return
607607a boolean true or false value signifying true if it passed the test or false if it did not:
608608
609609.. literalinclude :: validation/034.php
610610
611611By default, the system will look within ``CodeIgniter\Language\en\Validation.php `` for the language strings used
612- within errors. In custom rules, you may provide error messages by accepting a ``$error `` variable by reference in the
612+ within errors. In custom rules, you may provide error messages by accepting a ``& $error `` variable by reference in the
613613second parameter:
614614
615615.. literalinclude :: validation/035.php
@@ -624,13 +624,13 @@ Your new custom rule could now be used just like any other rule:
624624Allowing Parameters
625625-------------------
626626
627- If your method needs to work with parameters, the function will need a minimum of three parameters: the string to validate,
627+ If your method needs to work with parameters, the function will need a minimum of three parameters: the value to validate,
628628the parameter string, and an array with all of the data that was submitted the form. The ``$data `` array is especially handy
629629for rules like ``required_with `` that needs to check the value of another submitted field to base its result on:
630630
631631.. literalinclude :: validation/037.php
632632
633- Custom errors can be returned as the fourth parameter, just as described above.
633+ Custom errors can be returned as the fourth parameter `` &$error `` , just as described above.
634634
635635.. _validation-using-closure-rule :
636636
0 commit comments