Skip to content

Commit cdc01ef

Browse files
committed
fix: fix: add missing ValidationInterface::hasError(), listErrors() and showError()
1 parent 7868daf commit cdc01ef

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

system/Validation/ValidationInterface.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,19 @@ public function reset(): ValidationInterface;
9999
* @return array
100100
*/
101101
public function loadRuleGroup(?string $group = null);
102+
103+
/**
104+
* Checks to see if an error exists for the given field.
105+
*/
106+
public function hasError(string $field): bool;
107+
108+
/**
109+
* Returns the rendered HTML of the errors as defined in $template.
110+
*/
111+
public function listErrors(string $template = 'list'): string;
112+
113+
/**
114+
* Displays a single error in formatted HTML as defined in the $template view.
115+
*/
116+
public function showError(string $field, string $template = 'single'): string;
102117
}

0 commit comments

Comments
 (0)