diff --git a/form.php b/form.php index fadb0d8..b7c459a 100644 --- a/form.php +++ b/form.php @@ -182,7 +182,12 @@ class form $field->values = $values[$field->name]; if (isset ($errors[$field->name]) && $errors[$field->name] !== "unset") - $field->errors = $errors[$field->name]; + { + if (is_array ($errors[$field->name])) + $field->errors = $errors[$field->name]; + else + $field->errors = array ("error", $errors[$field->name]); + } $field->titlewidth = $this->titlewidth; $field->fieldwidth = $this->fieldwidth; $res .= $field->display ();