@@ -359,6 +359,20 @@ This method returns true if the validation is successful.
359359
360360.. literalinclude :: validation/043.php
361361
362+ Running Multiple Validations
363+ ============================
364+
365+ .. note :: ``run()`` method will not reset error state. Should a previous run fail,
366+ ``run() `` will always return false and ``getErrors() `` will return
367+ all previous errors until explicitly reset.
368+
369+ If you intend to run multiple validations, for instance on different data sets or with different
370+ rules after one another, you might need to call ``$validation->reset() `` before each run to get rid of
371+ errors from previous run. Be aware that ``reset() `` will invalidate any data, rule or custom error
372+ you previously set, so ``setRules() ``, ``setRuleGroup() `` etc. need to be repeated:
373+
374+ .. literalinclude :: validation/019.php
375+
362376Validating 1 Value
363377==================
364378
@@ -422,20 +436,6 @@ This method sets a rule group from the validation configuration to the validatio
422436
423437.. literalinclude :: validation/018.php
424438
425- Running Multiple Validations
426- ============================
427-
428- .. note :: ``run()`` method will not reset error state. Should a previous run fail,
429- ``run() `` will always return false and ``getErrors() `` will return
430- all previous errors until explicitly reset.
431-
432- If you intend to run multiple validations, for instance on different data sets or with different
433- rules after one another, you might need to call ``$validation->reset() `` before each run to get rid of
434- errors from previous run. Be aware that ``reset() `` will invalidate any data, rule or custom error
435- you previously set, so ``setRules() ``, ``setRuleGroup() `` etc. need to be repeated:
436-
437- .. literalinclude :: validation/019.php
438-
439439Validation Placeholders
440440=======================
441441
0 commit comments