Skip to content
Snippets Groups Projects
Commit 89e165ac authored by Jared Hancock's avatar Jared Hancock
Browse files

forms: Validate fields like the thread-entry

parent 6f88c0da
No related branches found
No related tags found
No related merge requests found
......@@ -93,7 +93,7 @@ class Form {
if (!$this->_clean) {
$this->_clean = array();
foreach ($this->getFields() as $key=>$field) {
if ($field->isPresentationOnly())
if (!$field->hasData())
continue;
$this->_clean[$key] = $this->_clean[$field->get('name')]
= $field->getClean();
......
......@@ -89,8 +89,7 @@ if (isset($options['entry']) && $options['mode'] == 'edit') { ?>
<?php
}
foreach ($field->errors() as $e) { ?>
<br />
<font class="error"><?php echo Format::htmlchars($e); ?></font>
<div class="error"><?php echo Format::htmlchars($e); ?></div>
<?php } ?>
</div></td>
</tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment