diff --git a/src/classes/html.php b/src/classes/html.php
index c1dcb6a..82efb69 100644
--- a/src/classes/html.php
+++ b/src/classes/html.php
@@ -127,4 +127,15 @@ final class html {
echo "{$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 .= "
{$i}) " . $error;
+ }
+ echo $message;
+ }
+ }
}
\ No newline at end of file