|
|
|
|
@ -127,4 +127,15 @@ final class html { |
|
|
|
|
echo "</table>{$nl}"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static function show_errors(?array $errors = []): void { |
|
|
|
|
if ($errors) { |
|
|
|
|
$message = "Please correct the following errors: "; |
|
|
|
|
$i = 0; |
|
|
|
|
foreach($errors as $error) { |
|
|
|
|
$i++; |
|
|
|
|
$message .= "<br/>{$i}) " . $error; |
|
|
|
|
} |
|
|
|
|
echo $message; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |