form : if the provided error for a field is not an array, use the default error class and use the value as message
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2698 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
7
form.php
7
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 ();
|
||||
|
||||
Reference in New Issue
Block a user